diff --git a/src/arm_linux.rs b/src/arm_linux.rs index 8f22eb62..66dfe830 100644 --- a/src/arm_linux.rs +++ b/src/arm_linux.rs @@ -91,6 +91,7 @@ unsafe fn atomic_cmpxchg(ptr: *mut T, oldval: u32, newval: u32) -> u32 { macro_rules! atomic_rmw { ($name:ident, $ty:ty, $op:expr, $fetch:expr) => { intrinsics! { + #[always_strong_if(target_os = "android")] pub unsafe extern "C" fn $name(ptr: *mut $ty, val: $ty) -> $ty { atomic_rmw(ptr, |x| $op(x as $ty, val) as u32, |old, new| $fetch(old, new)) as $ty } @@ -105,9 +106,11 @@ macro_rules! atomic_rmw { atomic_rmw!($name, $ty, $op, |_, new| new); }; } + macro_rules! atomic_cmpxchg { ($name:ident, $ty:ty) => { intrinsics! { + #[always_strong_if(target_os = "android")] pub unsafe extern "C" fn $name(ptr: *mut $ty, oldval: $ty, newval: $ty) -> $ty { atomic_cmpxchg(ptr, oldval as u32, newval as u32) as $ty } diff --git a/src/lib.rs b/src/lib.rs index 0d207a91..e14f5d5a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,6 +27,7 @@ #![allow(clippy::manual_swap)] // Support compiling on both stage0 and stage1 which may differ in supported stable features. #![allow(stable_features)] +#![recursion_limit = "256"] // We have some large macros // We disable #[no_mangle] for tests so that we can verify the test results // against the native compiler-rt implementations of the builtins.