Description
Would it be possible to make --target HOST
an alias that builds for the target triple of the host system? On Linux x86_64, it would be equivalent to --target x86_64-unknown-linux-gnu
and on Windows it would be equivalent to the Windows triple.
This would be useful for crates that override the default target in a .cargo/config
file, but still want to run some commands on the host sometimes. The advantage over specifying the target explicitly is that --target HOST
is portable across systems and can thus be used in scripts or cargo subcommand aliases.
An example are embedded crates that are compiled for an ARM board most of the time and thus override the default target for convenience. But for unit tests, the crates want to execute cargo test
on the host system.
Activity