diff --git a/Sources/RealModule/Float16+Real.swift b/Sources/RealModule/Float16+Real.swift index 6781683..98e97e8 100644 --- a/Sources/RealModule/Float16+Real.swift +++ b/Sources/RealModule/Float16+Real.swift @@ -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