From a99c95fdacead5f29ac73b1ada78730ba91bcf3e Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Fri, 27 Sep 2024 18:35:30 -0400 Subject: [PATCH 1/2] Enable `f16` tests on non-GNU Windows There is a MinGW ABI bug that prevents `f16` and `f128` from being usable on `windows-gnu` targets. This does not affect MSVC; however, we have `f16` and `f128` tests disabled on all Windows targets. Update the gating to only affect `windows-gnu`, which means `f16` tests will be enabled. There is no effect for `f128` since the default fallback is `false`. --- library/std/build.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/std/build.rs b/library/std/build.rs index 359ae4f20eea8..e727007cacde2 100644 --- a/library/std/build.rs +++ b/library/std/build.rs @@ -104,7 +104,7 @@ fn main() { // Unsupported ("arm64ec", _) => false, // MinGW ABI bugs - ("x86_64", "windows") => false, + ("x86_64", "windows") if target_env == "gnu" => false, // Apple has a special ABI for `f16` that we do not yet support // FIXME(builtins): fixed by ("x86" | "x86_64", _) if target_vendor == "apple" => false, @@ -135,10 +135,10 @@ fn main() { // ABI unsupported ("sparc", _) => false, // MinGW ABI bugs - ("x86_64", "windows") => false, + ("x86_64", "windows") if target_env == "gnu" => false, // 64-bit Linux is about the only platform to have f128 symbols by default (_, "linux") if target_pointer_width == 64 => true, - // Same as for f16, except MacOS is also missing f128 symbols. + // Almost all OSs are missing symbol. compiler-builtins will have to add them. _ => false, }; From 83d56df944a203f0930c81000969a5b1b00739a3 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Fri, 27 Sep 2024 18:59:52 -0400 Subject: [PATCH 2/2] Do not merge: change fallback for testing --- library/std/build.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/library/std/build.rs b/library/std/build.rs index e727007cacde2..a8009f28e3a9b 100644 --- a/library/std/build.rs +++ b/library/std/build.rs @@ -116,10 +116,9 @@ fn main() { ("riscv32" | "riscv64", _) => false, // Most OSs are missing `__extendhfsf` and `__truncsfhf` (_, "linux" | "macos") => true, - // Almost all OSs besides Linux and MacOS are missing symbols until compiler-builtins can - // be updated. will get some of these, the - // next CB update should get the rest. - _ => false, + // todo: only for testing, this line will wind up changed as part of + // . + _ => true, }; let has_reliable_f128 = match (target_arch.as_str(), target_os.as_str()) {