Skip to content

Commit 2e1289c

Browse files
committed
Auto merge of rust-lang#129385 - tgross35:more-platforms-enable-f16, 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
2 parents a32d4a0 + b557938 commit 2e1289c

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

library/std/build.rs

+4-12
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,10 @@ fn main() {
106106
// x86 has ABI bugs that show up with optimizations. This should be partially fixed with
107107
// the compiler-builtins update. <https://github.com/rust-lang/rust/issues/123885>
108108
("x86" | "x86_64", _) => false,
109-
// Missing `__gnu_h2f_ieee` and `__gnu_f2h_ieee`
110-
("powerpc" | "powerpc64", _) => false,
111-
// Missing `__gnu_h2f_ieee` and `__gnu_f2h_ieee`
112-
("mips" | "mips32r6" | "mips64" | "mips64r6", _) => false,
113-
// Missing `__extendhfsf` and `__truncsfhf`
114-
("riscv32" | "riscv64", _) => false,
115-
// Most OSs are missing `__extendhfsf` and `__truncsfhf`
116-
(_, "linux" | "macos") => true,
117-
// Almost all OSs besides Linux and MacOS are missing symbols until compiler-builtins can
118-
// be updated. <https://github.com/rust-lang/rust/pull/125016> will get some of these, the
119-
// next CB update should get the rest.
120-
_ => false,
109+
// `f16` support only requires that symbols converting to and from `f32` are available. We
110+
// provide these in `compiler-builtins`, so `f16` should be available on all platforms that
111+
// do not have other ABI issues or LLVM crashes.
112+
_ => true,
121113
};
122114

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

0 commit comments

Comments
 (0)