Skip to content

target-cpu=native is broken on latest nightly #53322

Closed
@robsmith11

Description

@robsmith11

Reproduce by creating a crate with cargo init and .cargo/config set to

[build]
rustflags = ["-C", "target-cpu=native"]

It produces the following errors:

tmp/test1 $ cargo build --release                                                                            
Compiling test1 v0.1.0 (file:///tmp/test1)                                                              
'native' is not a recognized processor for this target (ignoring processor)                                
'native' is not a recognized processor for this target (ignoring processor)                                
'native' is not a recognized processor for this target (ignoring processor)                                
'native' is not a recognized processor for this target (ignoring processor)
'native' is not a recognized processor for this target (ignoring processor)
'native' is not a recognized processor for this target (ignoring processor)                                
'native' is not a recognized processor for this target (ignoring processor)                                
'native' is not a recognized processor for this target (ignoring processor)                                    
Finished release [optimized] target(s) in 0.25s

It was working fine on nightly-2018-08-06-x86_64-unknown-linux-gnu, but broke with
nightly-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:

$ rustc --print target-cpus
Available CPUs for this target:
    native         - Select the CPU of the current host (currently skylake).
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions