about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-07-25 16:15:42 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2020-07-25 16:15:42 +0200
commite02ffdf7956b3a36b2e45ada9e8dc2e3ab302c4f (patch)
treec139e6b5c88844f646df429eaa7f59771249241c /src
parentc1efc33941c53720f31a2667176e82deddad6a51 (diff)
downloadrust-e02ffdf7956b3a36b2e45ada9e8dc2e3ab302c4f.tar.gz
rust-e02ffdf7956b3a36b2e45ada9e8dc2e3ab302c4f.zip
Use nehalem instead of haswell as target cpu
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0376672fba7..38ff7e90b3b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -320,7 +320,9 @@ fn build_isa(sess: &Session, enable_pic: bool) -> Box<dyn isa::TargetIsa + 'stat
     let flags = settings::Flags::new(flags_builder);
 
     let mut isa_builder = cranelift_codegen::isa::lookup(target_triple).unwrap();
-    isa_builder.enable("haswell").unwrap();
+    // Don't use "haswell", as it implies `has_lzcnt`.macOS CI is still at Ivy Bridge EP, so `lzcnt`
+    // is interpreted as `bsr`.
+    isa_builder.enable("nehalem").unwrap();
     isa_builder.finish(flags)
 }