ignore "target-cpu=native" when cross compiling with "target" #15024
Labels
A-rustflags
Area: rustflags
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-triage
Status: This issue is waiting on initial triage.
Problem
-Ctarget-cpu=native
in rustflags displays a huge amount of warnings when also using the "target" parameter for cross compilation.Proposed Solution
Ignore the
target-cpu=native
parameter when the target parameter is also set (i.e. when cross compiling) and write a single warning message instead of multiple pages, like:Notes
Please correct me if this is working as intended, here are my assumptions and the use case:
rustflags = ["-Ctarget-cpu=native"]
under the[build]
section of~/.cargo/config.toml
.cargo check
works before adding the new platform to the GitHub action, I'm usingcargo check --target aarch64-unknown-linux-gnu
. However this will output several pages of warnings like this:The text was updated successfully, but these errors were encountered: