Skip to content

Commit 6a80b90

Browse files
committed
Configure f16 and f128 support for WebAssembly
1 parent 3ad4d9c commit 6a80b90

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Diff for: build.rs

+2
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ fn configure_f16_f128(target: &Target) {
283283
"powerpc64" if &target.os == "aix" => (true, false),
284284
// `f128` crashes <https://github.com/llvm/llvm-project/issues/41838>
285285
"sparc" | "sparcv9" => (true, false),
286+
// `f16` miscompiles <https://github.com/llvm/llvm-project/issues/96438>
287+
"wasm32" | "wasm64" => (false, true),
286288
// Most everything else works as of LLVM 19
287289
_ => (true, true),
288290
};

Diff for: testcrate/build.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ fn main() {
5454
|| target.starts_with("i586-")
5555
|| target.contains("windows-")
5656
// Linking says "error: function signature mismatch: __extendhfsf2" and seems to
57-
// think the signature is either `(i32) -> f32` or `(f32) -> f32`
58-
|| target.starts_with("wasm32-")
57+
// think the signature is either `(i32) -> f32` or `(f32) -> f32`. See
58+
// <https://github.com/llvm/llvm-project/issues/96438>.
59+
|| target.starts_with("wasm")
5960
{
6061
features.insert(Feature::NoSysF16);
6162
features.insert(Feature::NoSysF16F128Convert);

0 commit comments

Comments
 (0)