From 084217af65b212c3c68f66d798faa19bcef5007a Mon Sep 17 00:00:00 2001 From: Oliver Middleton Date: Wed, 8 Jan 2020 22:56:33 +0000 Subject: Don't use f64 shims for f32 cmath functions on none 32-bit x86 MSVC These shims are only needed on 32-bit x86. Additionally since https://reviews.llvm.org/rL268875 LLVM handles adding the shims itself for the intrinsics. --- src/libstd/sys/windows/cmath.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libstd/sys') diff --git a/src/libstd/sys/windows/cmath.rs b/src/libstd/sys/windows/cmath.rs index 6f5d40b494f..1a5421facd0 100644 --- a/src/libstd/sys/windows/cmath.rs +++ b/src/libstd/sys/windows/cmath.rs @@ -27,7 +27,7 @@ extern "C" { pub use self::shims::*; -#[cfg(not(target_env = "msvc"))] +#[cfg(not(all(target_env = "msvc", target_arch = "x86")))] mod shims { use libc::c_float; @@ -43,10 +43,10 @@ mod shims { } } -// On MSVC these functions aren't defined, so we just define shims which promote -// everything fo f64, perform the calculation, and then demote back to f32. -// While not precisely correct should be "correct enough" for now. -#[cfg(target_env = "msvc")] +// On 32-bit x86 MSVC these functions aren't defined, so we just define shims +// which promote everything fo f64, perform the calculation, and then demote +// back to f32. While not precisely correct should be "correct enough" for now. +#[cfg(all(target_env = "msvc", target_arch = "x86"))] mod shims { use libc::c_float; -- cgit 1.4.1-3-g733a5