I want to compile two binaries for different target architectures (eg. Skylake and Sandy Bridge). These are usually two lengthy cargo commands:
RUSTFLAGS="-C target-cpu=skylake" cargo build --target x86_64-unknown-linux-gnu --release
How can I set up cargo to build both binaries (with different names) from the same main.rs automatically?
Ideally in either the config.toml or the Cargo.toml so I can add it to a repository.
build.shthat runs both commands? - eggyal