From 5172f8c218a4d8af54cdf776d917235fffff293e Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 23 Jun 2017 12:02:28 -0700 Subject: [PATCH] Tweak usage of C shims on MSVC --- src/float/conv.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/float/conv.rs b/src/float/conv.rs index 053c681..ca95b11 100644 --- a/src/float/conv.rs +++ b/src/float/conv.rs @@ -78,7 +78,10 @@ intrinsics! { int_to_float!(i, i32, f64) } - #[use_c_shim_if(any(target_arch = "x86", target_arch = "x86_64"))] + #[use_c_shim_if(any( + all(not(target_env = "msvc"), target_arch = "x86", target_arch = "x86_64"), + all(target_env = "msvc", target_arch = "x86_64"), + ))] pub extern "C" fn __floatdidf(i: i64) -> f64 { int_to_float!(i, i64, f64) } @@ -101,7 +104,8 @@ intrinsics! { int_to_float!(i, u32, f64) } - #[use_c_shim_if(any(target_arch = "x86", target_arch = "x86_64"))] + #[use_c_shim_if(all(any(target_arch = "x86", target_arch = "x86_64"), + not(target_env = "msvc")))] pub extern "C" fn __floatundidf(i: u64) -> f64 { int_to_float!(i, u64, f64) }