diff --git a/library/compiler-builtins/src/arm.rs b/library/compiler-builtins/src/arm.rs index f3b22544a8ce..e517a9ef34b8 100644 --- a/library/compiler-builtins/src/arm.rs +++ b/library/compiler-builtins/src/arm.rs @@ -22,7 +22,7 @@ intrinsics! { // custom calling convention which can't be implemented using a normal Rust function. #[naked] #[cfg(not(target_env = "msvc"))] - #[linkage = "weak"] + #[cfg_attr(all(not(windows), not(target_vendor="apple")), linkage = "weak")] pub unsafe extern "C" fn __aeabi_uidivmod() { core::arch::asm!( "push {{lr}}", @@ -37,7 +37,7 @@ intrinsics! { } #[naked] - #[linkage = "weak"] + #[cfg_attr(all(not(windows), not(target_vendor="apple")), linkage = "weak")] pub unsafe extern "C" fn __aeabi_uldivmod() { core::arch::asm!( "push {{r4, lr}}", @@ -54,7 +54,7 @@ intrinsics! { } #[naked] - #[linkage = "weak"] + #[cfg_attr(all(not(windows), not(target_vendor="apple")), linkage = "weak")] pub unsafe extern "C" fn __aeabi_idivmod() { core::arch::asm!( "push {{r0, r1, r4, lr}}", @@ -68,7 +68,7 @@ intrinsics! { } #[naked] - #[linkage = "weak"] + #[cfg_attr(all(not(windows), not(target_vendor="apple")), linkage = "weak")] pub unsafe extern "C" fn __aeabi_ldivmod() { core::arch::asm!( "push {{r4, lr}}",