Skip to content

Commit 7dd3b20

Browse files
committed
Auto merge of #31727 - semarie:openbsd-llvm-cpu, r=alexcrichton
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 #20777, "x86-64" is the right thing to do for x86_64 builds. Closes: #31363 r? @alexcrichton
2 parents a9430a3 + 6cb41e2 commit 7dd3b20

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librustc_back/target/x86_64_unknown_openbsd.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::openbsd_base::opts();
15+
base.cpu = "x86-64".to_string();
1516
base.pre_link_args.push("-m64".to_string());
1617

1718
Target {

0 commit comments

Comments
 (0)