diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 16eef12..c6249f0 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -10,6 +10,8 @@ jobs: uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main with: windows_exclude_swift_versions: '[{"swift_version": "5.9"}]' + enable_wasm_sdk_build: true + wasm_sdk_build_command: swift build --target Numerics soundness: name: Soundness uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main diff --git a/Sources/_NumericsShims/include/_NumericsShims.h b/Sources/_NumericsShims/include/_NumericsShims.h index 0cf3c19..8b7bf99 100644 --- a/Sources/_NumericsShims/include/_NumericsShims.h +++ b/Sources/_NumericsShims/include/_NumericsShims.h @@ -389,6 +389,7 @@ HEADER_SHIM long double libm_lgammal(long double x, int *signp) { // MARK: - math inlines with relaxed semantics to support optimization. #define CLANG_RELAX_FP _Pragma("clang fp reassociate(on) contract(fast)") +#if !defined __wasm__ // No _Float16 on wasm /// a + b with the "allow reassociation" and "allow FMA formation" flags /// set in the IR. HEADER_SHIM _Float16 _numerics_relaxed_addf16(_Float16 a, _Float16 b) { @@ -402,6 +403,7 @@ HEADER_SHIM _Float16 _numerics_relaxed_mulf16(_Float16 a, _Float16 b) { CLANG_RELAX_FP return a * b; } +#endif /// a + b with the "allow reassociation" and "allow FMA formation" flags /// set in the IR.