mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
12a539f484
Fix printing native CPU on cross-compiled compiler. If `rustc` is cross-compiled from a different host, then the "native" entry in `rustc --print=target-cpus` would not appear. There is a check in the printing code that will avoid printing the "native" entry if the user has passed `--target`. However, that check was comparing the `--target` value with the `LLVM_TARGET_TRIPLE` which is the triple of the host that `rustc` was built on (the "build" target in Rust lingo), not the target it was being built for (the "host" in Rust lingo). This fixes it to use the target that LLVM was built for (which I'm pretty sure this is the correct function to determine that). This fixes the cpu listing for aarch64-apple-darwin which is built on CI using the x86_64-apple-darwin host. |
||
---|---|---|
.. | ||
llvm-wrapper | ||
src | ||
build.rs | ||
Cargo.toml |