Skip to content

Commit 46619b4

Browse files
committed
Attempt to turn on workflows testing for wasm.
1 parent 231815e commit 46619b4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.github/workflows/pull_request.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
1111
with:
1212
windows_exclude_swift_versions: '[{"swift_version": "5.9"}]'
13+
enable_wasm_sdk_build: true
14+
wasm_sdk_build_command: swift build --target Numerics
1315
soundness:
1416
name: Soundness
1517
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main

Sources/_NumericsShims/include/_NumericsShims.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ HEADER_SHIM long double libm_lgammal(long double x, int *signp) {
389389
// MARK: - math inlines with relaxed semantics to support optimization.
390390
#define CLANG_RELAX_FP _Pragma("clang fp reassociate(on) contract(fast)")
391391

392+
#if !defined __wasm__ // No _Float16 on wasm
392393
/// a + b with the "allow reassociation" and "allow FMA formation" flags
393394
/// set in the IR.
394395
HEADER_SHIM _Float16 _numerics_relaxed_addf16(_Float16 a, _Float16 b) {
@@ -402,6 +403,7 @@ HEADER_SHIM _Float16 _numerics_relaxed_mulf16(_Float16 a, _Float16 b) {
402403
CLANG_RELAX_FP
403404
return a * b;
404405
}
406+
#endif
405407

406408
/// a + b with the "allow reassociation" and "allow FMA formation" flags
407409
/// set in the IR.

0 commit comments

Comments
 (0)