Remove relaxed add/mul for Float16 on wasm, as they cannot be defined.

This commit is contained in:
Stephen Canon committed 2025-08-14 09:45:04 -04:00
1 parent 46619b49ec
commit 5bfe9e16ce
1 file changed
+5
+5
View File
@@ -173,6 +173,10 @@ extension Float16: Real {
}
#endif
#if !arch(wasm32)
// WASM doesn't have _Float16 on the C side, so we can't define the C hooks
// that these use. TODO: implement these as Swift builtins instead.
@_transparent
public static func _relaxedAdd(_ a: Float16, _ b: Float16) -> Float16 {
_numerics_relaxed_addf16(a, b)
@@ -182,6 +186,7 @@ extension Float16: Real {
public static func _relaxedMul(_ a: Float16, _ b: Float16) -> Float16 {
_numerics_relaxed_mulf16(a, b)
}
#endif
}
#endif