Skip to content

Commit

Permalink
Use more specific target CPUs on Darwin
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dotdash committed Jan 26, 2015
1 parent 9252525 commit bca25ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/librustc_back/target/i686_apple_darwin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use target::Target;

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

Target {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_back/target/x86_64_apple_darwin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use target::Target;

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

Expand Down

0 comments on commit bca25ae

Please sign in to comment.