Skip to content

Commit

Permalink
Enable f128 tests on all non-buggy platforms 🎉
Browse files Browse the repository at this point in the history
With the `compiler-builtins` update to 0.1.137 [1], we now provide
symbols necessary to work with `f128` everywhere. This means that we are
no longer restricted to 64-bit linux, and can enable tests by default.

There are still a handful of platforms that need to remain disabled
because of bugs. This patch additionally disables the following:

1. MIPS [2]
2. 32-bit x86 [3]

Math support is still off by default since those symbols are not yet
available.

[1]: rust-lang#132433
[2]: llvm/llvm-project#96432
[3]: llvm/llvm-project#77401
  • Loading branch information
tgross35 committed Nov 4, 2024
1 parent 95ecf0c commit c0fc25c
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions library/std/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,24 @@ fn main() {
_ if is_miri => true,
// Unsupported <https://github.com/llvm/llvm-project/issues/94434>
("arm64ec", _) => false,
// ABI and precision bugs <https://github.com/rust-lang/rust/issues/125109>
// <https://github.com/rust-lang/rust/issues/125102>
("powerpc" | "powerpc64", _) => false,
// Selection bug <https://github.com/llvm/llvm-project/issues/96432>
("mips64" | "mips64r6", _) => false,
// Selection bug <https://github.com/llvm/llvm-project/issues/95471>
("nvptx64", _) => false,
// ABI bugs <https://github.com/rust-lang/rust/issues/125109> et al. (full
// list at <https://github.com/rust-lang/rust/issues/116909>)
("powerpc" | "powerpc64", _) => false,
// ABI unsupported <https://github.com/llvm/llvm-project/issues/41838>
("sparc", _) => false,
// Stack alignment bug <https://github.com/llvm/llvm-project/issues/77401>. NB: tests may
// not fail if our compiler-builtins is linked.
("x86", _) => false,
// MinGW ABI bugs <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054>
("x86_64", "windows") if target_env == "gnu" && target_abi != "llvm" => false,
// 64-bit Linux is about the only platform to have f128 symbols by default
(_, "linux") if target_pointer_width == 64 => true,
// Almost all OSs are missing symbol. compiler-builtins will have to add them.
_ => false,
// There are no known problems on other platforms, so the only requirement is that symbols
// are available. `compiler-builtins` provides all symbols required for core `f128`
// support, so this should work for everything else.
_ => true,
};

// Configure platforms that have reliable basics but may have unreliable math.
Expand Down

0 comments on commit c0fc25c

Please sign in to comment.