From d3e78c5f6f338db025b685dab29495fdb84c20d7 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 23 Jun 2017 21:09:24 -0700 Subject: [PATCH] Don't compile assembly on x86_64 Windows They've all got the wrong ABI... --- library/compiler-builtins/build.rs | 24 ++++++++++++--------- library/compiler-builtins/src/float/conv.rs | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/library/compiler-builtins/build.rs b/library/compiler-builtins/build.rs index 7c09987ad0ae..06e1155bae40 100644 --- a/library/compiler-builtins/build.rs +++ b/library/compiler-builtins/build.rs @@ -4142,16 +4142,20 @@ mod c { sources.extend(&["gcc_personality_v0.c"]); } - if target_arch == "x86_64" { - sources.extend( - &[ - "x86_64/floatdisf.c", - "x86_64/floatdixf.c", - "x86_64/floatundidf.S", - "x86_64/floatundisf.S", - "x86_64/floatundixf.S", - ], - ); + // None of these seem to be used on x86_64 windows, and they've all + // got the wrong ABI anyway, so we want to avoid them. + if target_os != "windows" { + if target_arch == "x86_64" { + sources.extend( + &[ + "x86_64/floatdisf.c", + "x86_64/floatdixf.c", + "x86_64/floatundidf.S", + "x86_64/floatundisf.S", + "x86_64/floatundixf.S", + ], + ); + } } if target_arch == "x86" { diff --git a/library/compiler-builtins/src/float/conv.rs b/library/compiler-builtins/src/float/conv.rs index 8fc2a2a79511..ec77f2bf873e 100644 --- a/library/compiler-builtins/src/float/conv.rs +++ b/library/compiler-builtins/src/float/conv.rs @@ -113,7 +113,7 @@ intrinsics! { } #[use_c_shim_if(all(any(target_arch = "x86", target_arch = "x86_64"), - not(target_env = "msvc")))] + not(windows)))] #[arm_aeabi_alias = __aeabi_ul2d] pub extern "C" fn __floatundidf(i: u64) -> f64 { int_to_float!(i, u64, f64)