Skip to content

Commit

Permalink
Auto merge of #21646 - dotdash:default_target_cpu, r=Aatch
Browse files Browse the repository at this point in the history
Using `generic` as the target cpu limits the generated code to the bare basics for the arch, while we can probably assume that we'll actually be running on somewhat modern hardware. This updates the default target CPUs for the x86 and x86_64 archs to match clang's behaviour.

Refs #20777
  • Loading branch information
bors committed Jan 27, 2015
2 parents a6a6fad + 296c74d commit 1c87af2
Show file tree
Hide file tree
Showing 5 changed files with 5 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
1 change: 1 addition & 0 deletions src/librustc_back/target/i686_pc_windows_gnu.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 options = super::windows_base::opts();
options.cpu = "pentium4".to_string();

// Mark all dynamic libraries and executables as compatible with the larger 4GiB address
// space available to x86 Windows binaries on x86_64.
Expand Down
1 change: 1 addition & 0 deletions src/librustc_back/target/i686_unknown_dragonfly.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::dragonfly_base::opts();
base.cpu = "pentium4".to_string();
base.pre_link_args.push("-m32".to_string());

Target {
Expand Down
1 change: 1 addition & 0 deletions src/librustc_back/target/i686_unknown_linux_gnu.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::linux_base::opts();
base.cpu = "pentium4".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 1c87af2

Please sign in to comment.