fix(wasm): Fix asyncify rewind with asyncify-aware dynCall shims
Emscripten 4.x removed dynCall_* WASM exports, breaking asyncify
rewind through indirect calls (modal dialogs, event handlers).
Generate JS shims that track Asyncify.exportCallStack and register
in wasmExports so doRewind can find them.
Also fixes empty callback functions ((() => {})) generated by
Emscripten 4.x + pthreads for HTML5 events, pthread entry,
sighandler, async timer, and main loop callbacks.
Build pipeline improvements:
- Stub wasm-opt/finalize in Docker (RAM limits), run on host
- Add setup-emsdk.sh for reproducible Emscripten setup
- Simplify env.sh and version management
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
51b158f6b1
commit
b46b4b69f1
13 changed files with 150 additions and 65 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# Use ARM64-native image for Apple Silicon (M1/M2/M3/M4)
|
||||
FROM emscripten/emsdk:4.0.22-arm64
|
||||
FROM emscripten/emsdk:4.0.2-arm64
|
||||
|
||||
# Install build tools required for KiCad WASM build
|
||||
RUN apt-get update && apt-get install -y \
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ docker compose -f docker/docker-compose.yml up -d
|
|||
# This avoids the timestamp mismatch cycle that caused full rebuilds every time.
|
||||
# Transferred files get current container time, so make detects them correctly.
|
||||
echo "Syncing source code to container..."
|
||||
# rsync exit code 24 = "some files vanished before transfer" (harmless race condition)
|
||||
docker compose -f docker/docker-compose.yml exec kicad-wasm-builder \
|
||||
rsync -r --delete --checksum \
|
||||
--exclude="build-wasm" \
|
||||
|
|
@ -41,7 +42,8 @@ docker compose -f docker/docker-compose.yml exec kicad-wasm-builder \
|
|||
--exclude="logs" \
|
||||
--exclude=".idea" \
|
||||
--exclude="node_modules" \
|
||||
/workspace-host/ /workspace/
|
||||
--exclude="tools/emsdk" \
|
||||
/workspace-host/ /workspace/ || [ $? -eq 24 ]
|
||||
|
||||
# Run build command (without asyncify - handled on host due to memory requirements)
|
||||
docker compose -f docker/docker-compose.yml exec kicad-wasm-builder \
|
||||
|
|
|
|||
Loading…
Reference in a new issue