Commit b86318a
* Fix #155: switch WASM builds from legacy Asyncify to JSPI
cmake/Emscripten.cmake set both -fwasm-exceptions (compile + link) and
-sASYNCIFY=1 (per-target link), and recent emsdk releases hard-fail the
combination in wasm-opt with `__asyncify_get_call_index does not exist`,
breaking the wasm.yml workflow. JSPI (JavaScript Promise Integration) is
the upstream-recommended replacement for legacy Asyncify and is
compatible with native WebAssembly exception handling, so the per-target
flag now reads -sJSPI=1 and the no-longer-relevant
myproject_WASM_ASYNCIFY_STACK_SIZE cache variable is dropped. A new
CMake-script regression test stubs the target/global option commands,
includes Emscripten.cmake under EMSCRIPTEN=TRUE, and asserts that the
legacy flags are gone, JSPI is emitted, and -fwasm-exceptions remains.
* Address review: remove WASM cmake-script regression test
Requested by @lefticus in PR #156 review.
* Address review: switch WASM EH to -fexceptions, restore Asyncify
Native wasm exceptions (-fwasm-exceptions) are incompatible with legacy
Asyncify, and JSPI is not yet available in all browsers. Switch the
Emscripten exception model to -fexceptions (JS-based) and restore
-sASYNCIFY=1 / -sASYNCIFY_STACK_SIZE so the WASM build keeps working
across every browser that supports threads, until JSPI is universally
available.
Requested by @lefticus in PR #156 review.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: leftibot <leftibot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a3971f5 commit b86318a
1 file changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
92 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
| |||
0 commit comments