Skip to content

Commit

Permalink
Update build.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
AdinAck committed Aug 30, 2023
1 parent 3a35bf2 commit 47f3fea
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ fn main() -> Result<(), Box<dyn Error>> {
println!("cargo:rustc-cfg=unstable_channel");
}

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(())
Expand Down

0 comments on commit 47f3fea

Please sign in to comment.