Merge pull request #350 from rjsberry/fix-aarch64-llsc

Fix pool (mis)compile on AArch64
This commit is contained in:
Alex Martens 2023-10-20 23:33:08 +00:00 committed by GitHub
commit 7d3282b838
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,9 +88,13 @@ fn main() -> Result<(), Box<dyn Error>> {
}
}
match compile_probe(ARM_LLSC_PROBE) {
Some(status) if status.success() => println!("cargo:rustc-cfg=arm_llsc"),
_ => {}
// AArch64 instruction set contains `clrex` but not `ldrex` or `strex`; the
// probe will succeed when we already know to deny this target from LLSC.
if !target.starts_with("aarch64") {
match compile_probe(ARM_LLSC_PROBE) {
Some(status) if status.success() => println!("cargo:rustc-cfg=arm_llsc"),
_ => {}
}
}
Ok(())