Skip to content

Commit

Permalink
Auto merge of rust-lang#129385 - tgross35:more-platforms-enable-f16, …
Browse files Browse the repository at this point in the history
…r=<try>

Enable `f16` tests on platforms that were missing conversion symbols

The only requirement for `f16` support, aside from LLVM not crashing and no ABI issues, is that symbols to convert to and from `f32` are available. Since the update to compiler-builtins in rust-lang#125016, we now provide these on all platforms.

This also enables `f16` math since there are no further requirements.

try-job: dist-powerpc64-linux
try-job: dist-powerpc64le-linux
try-job: dist-riscv64-linux
try-job: dist-aarch64-msvc
  • Loading branch information
bors committed Aug 22, 2024
2 parents a32d4a0 + b557938 commit 2e1289c
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions library/std/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,10 @@ fn main() {
// x86 has ABI bugs that show up with optimizations. This should be partially fixed with
// the compiler-builtins update. <https://github.com/rust-lang/rust/issues/123885>
("x86" | "x86_64", _) => false,
// Missing `__gnu_h2f_ieee` and `__gnu_f2h_ieee`
("powerpc" | "powerpc64", _) => false,
// Missing `__gnu_h2f_ieee` and `__gnu_f2h_ieee`
("mips" | "mips32r6" | "mips64" | "mips64r6", _) => false,
// Missing `__extendhfsf` and `__truncsfhf`
("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. <https://github.com/rust-lang/rust/pull/125016> will get some of these, the
// next CB update should get the rest.
_ => false,
// `f16` support only requires that symbols converting to and from `f32` are available. We
// provide these in `compiler-builtins`, so `f16` should be available on all platforms that
// do not have other ABI issues or LLVM crashes.
_ => true,
};

let has_reliable_f128 = match (target_arch.as_str(), target_os.as_str()) {
Expand Down

0 comments on commit 2e1289c

Please sign in to comment.