Skip to content

Commit bca25ae

Browse files
committed
Use more specific target CPUs on Darwin
Macs don't come with anything older than a Yonah (32bit) or Core2 (64bit), so we can default to those targets. Clang does the same.
1 parent 9252525 commit bca25ae

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/librustc_back/target/i686_apple_darwin.rs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use target::Target;
1212

1313
pub fn target() -> Target {
1414
let mut base = super::apple_base::opts();
15+
base.cpu = "yonah".to_string();
1516
base.pre_link_args.push("-m32".to_string());
1617

1718
Target {

src/librustc_back/target/x86_64_apple_darwin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use target::Target;
1212

1313
pub fn target() -> Target {
1414
let mut base = super::apple_base::opts();
15-
base.cpu = "x86-64".to_string();
15+
base.cpu = "core2".to_string();
1616
base.eliminate_frame_pointer = false;
1717
base.pre_link_args.push("-m64".to_string());
1818

0 commit comments

Comments
 (0)