Skip to content

Commit

Permalink
Auto merge of rust-lang#31727 - semarie:openbsd-llvm-cpu, r=alexcrichton
Browse files Browse the repository at this point in the history
The initial purpose is to workaround the LLVM bug
https://llvm.org/bugs/show_bug.cgi?id=26554 for OpenBSD.

By default, the `cpu` is defined to `generic`. But with a 64bit
processor, the optimization for `generic` will use invalid asm code as
NOP (the generated code for NOP isn't a NOP).

According to rust-lang#20777, "x86-64" is the right thing to do for x86_64
builds.

Closes: rust-lang#31363

r? @alexcrichton
  • Loading branch information
bors committed Feb 18, 2016
2 parents a9430a3 + 6cb41e2 commit 7dd3b20
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/librustc_back/target/x86_64_unknown_openbsd.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::openbsd_base::opts();
base.cpu = "x86-64".to_string();
base.pre_link_args.push("-m64".to_string());

Target {
Expand Down

0 comments on commit 7dd3b20

Please sign in to comment.