-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
target-cpu=native
is broken on latest nightly
#53322
Comments
I'm seeing this with
|
|
|
And.. What happened and why? Is it a broken LLVM version or what? |
Problem still present with $ rustc --print cfg
debug_assertions
target_arch="x86_64"
target_endian="little"
target_env=""
target_family="unix"
target_feature="fxsr"
target_feature="mmx"
target_feature="sse"
target_feature="sse2"
target_feature="sse3"
target_feature="ssse3"
target_has_atomic="128"
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="cas"
target_has_atomic="ptr"
target_os="macos"
target_pointer_width="64"
target_thread_local
target_vendor="apple"
unix
$ rustc --print cfg -C target-cpu=native -C opt-level=3
target_arch="x86_64"
target_endian="little"
target_env=""
target_family="unix"
target_feature="aes"
target_feature="avx"
target_feature="avx2"
target_feature="bmi1"
target_feature="bmi2"
target_feature="fma"
target_feature="fxsr"
target_feature="lzcnt"
target_feature="mmx"
target_feature="pclmulqdq"
target_feature="popcnt"
target_feature="rdrand"
target_feature="rdseed"
target_feature="sse"
target_feature="sse2"
target_feature="sse3"
target_feature="sse4.1"
target_feature="sse4.2"
target_feature="ssse3"
target_feature="xsave"
target_feature="xsavec"
target_feature="xsaveopt"
target_feature="xsaves"
target_has_atomic="128"
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="cas"
target_has_atomic="ptr"
target_os="macos"
target_pointer_width="64"
target_thread_local
target_vendor="apple"
unix This is especially weird as it accepts it for printing the configuration, but then doesn't when actually compiling. 😫 |
Still seeing this with |
cc @nagisa @alexcrichton -- anybody have any ideas what's going on here? Could this be related to an LLVM upgrade or something? |
Marking as P-high for now. This is a regression, but on the other hand, if the message is coming from LLVM, there may not be a lot we can do here? Would be nice to get some more insight into what might be happening here. |
I've bisected this to #53031 and can reproduce this with a simple cc @michaelwoerister (as a heads up) I'll look into seeing if we can extract the name of the CPU from LLVM and see if we can set that instead. |
This should be fixed in #53642 |
This fixes a regression from rust-lang#53031 where specifying `-C target-cpu=native` is printing a lot of warnings from LLVM about `native` being an unknown CPU. It turns out that `native` is indeed an unknown CPU and we have to perform a mapping to an actual CPU name, but this mapping is only performed in one location rather than all locations we inform LLVM about the target CPU. This commit centralizes the mapping of `native` to LLVM's value of the native CPU, ensuring that all locations we inform LLVM about the `target-cpu` it's never `native`. Closes rust-lang#53322
Fix warnings about the `native` target-cpu This fixes a regression from #53031 where specifying `-C target-cpu=native` is printing a lot of warnings from LLVM about `native` being an unknown CPU. It turns out that `native` is indeed an unknown CPU and we have to perform a mapping to an actual CPU name, but this mapping is only performed in one location rather than all locations we inform LLVM about the target CPU. This commit centralizes the mapping of `native` to LLVM's value of the native CPU, ensuring that all locations we inform LLVM about the `target-cpu` it's never `native`. Closes #53322
This fixes a regression from rust-lang#53031 where specifying `-C target-cpu=native` is printing a lot of warnings from LLVM about `native` being an unknown CPU. It turns out that `native` is indeed an unknown CPU and we have to perform a mapping to an actual CPU name, but this mapping is only performed in one location rather than all locations we inform LLVM about the target CPU. This commit centralizes the mapping of `native` to LLVM's value of the native CPU, ensuring that all locations we inform LLVM about the `target-cpu` it's never `native`. Closes rust-lang#53322
Fix warnings about the `native` target-cpu This fixes a regression from #53031 where specifying `-C target-cpu=native` is printing a lot of warnings from LLVM about `native` being an unknown CPU. It turns out that `native` is indeed an unknown CPU and we have to perform a mapping to an actual CPU name, but this mapping is only performed in one location rather than all locations we inform LLVM about the target CPU. This commit centralizes the mapping of `native` to LLVM's value of the native CPU, ensuring that all locations we inform LLVM about the `target-cpu` it's never `native`. Closes #53322
This fixes a regression from rust-lang#53031 where specifying `-C target-cpu=native` is printing a lot of warnings from LLVM about `native` being an unknown CPU. It turns out that `native` is indeed an unknown CPU and we have to perform a mapping to an actual CPU name, but this mapping is only performed in one location rather than all locations we inform LLVM about the target CPU. This commit centralizes the mapping of `native` to LLVM's value of the native CPU, ensuring that all locations we inform LLVM about the `target-cpu` it's never `native`. Closes rust-lang#53322
Fix warnings about the `native` target-cpu This fixes a regression from #53031 where specifying `-C target-cpu=native` is printing a lot of warnings from LLVM about `native` being an unknown CPU. It turns out that `native` is indeed an unknown CPU and we have to perform a mapping to an actual CPU name, but this mapping is only performed in one location rather than all locations we inform LLVM about the target CPU. This commit centralizes the mapping of `native` to LLVM's value of the native CPU, ensuring that all locations we inform LLVM about the `target-cpu` it's never `native`. Closes #53322
I still got the following error when I was compiling alacritty:
Here are some of my configurations that may be useful:
|
@alexcrichton Can you take a look at this? Thanks. |
@EFanZh: The error is unclear, can you do a verbose build? |
Here is the log from verbose build:
|
Please file an issue at https://github.com/brendanzab/gl-rs/ for this. This issue has been solved. It may seem related to yours but it is independent. |
I do think this is a Rust issue, or maybe an LLVM issue. My guess is that Rust translates I have tested the following commands to determine my CPU’s capability:
|
What does |
I have listed my CPU info above. |
|
Reproduce by creating a crate with
cargo init
and .cargo/config set toIt produces the following errors:
It was working fine on
nightly-2018-08-06-x86_64-unknown-linux-gnu
, but broke withnightly-2018-08-14-x86_64-unknown-linux-gnu
(rustup doesn't show any nightlies available between those dates.Hardware is Skylake Xeon and correctly detected by
rustc --print
:The text was updated successfully, but these errors were encountered: