Skip to content

Commit 7d3282b

Browse files
authored
Merge pull request #350 from rjsberry/fix-aarch64-llsc
Fix pool (mis)compile on AArch64
2 parents 357f82c + 8cdd497 commit 7d3282b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

build.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,13 @@ fn main() -> Result<(), Box<dyn Error>> {
8888
}
8989
}
9090

91-
match compile_probe(ARM_LLSC_PROBE) {
92-
Some(status) if status.success() => println!("cargo:rustc-cfg=arm_llsc"),
93-
_ => {}
91+
// AArch64 instruction set contains `clrex` but not `ldrex` or `strex`; the
92+
// probe will succeed when we already know to deny this target from LLSC.
93+
if !target.starts_with("aarch64") {
94+
match compile_probe(ARM_LLSC_PROBE) {
95+
Some(status) if status.success() => println!("cargo:rustc-cfg=arm_llsc"),
96+
_ => {}
97+
}
9498
}
9599

96100
Ok(())

0 commit comments

Comments
 (0)