swift
5efba909 - Merge pull request #89768 from MaxDesiatov/maxd/emscripten/01-emscripten-build-system

Commit
46 days ago
Merge pull request #89768 from MaxDesiatov/maxd/emscripten/01-emscripten-build-system # CMake: Add Emscripten build system configuration Wire the `wasm32-unknown-emscripten` target through the build infrastructure. No Swift stdlib code yet. - Product classes `EmscriptenSysroot` and `EmscriptenLLVMRuntimeLibs` (emsdk sysroot + compiler-rt builtins), `EmscriptenStdlib` (configures the stdlib + SDK overlay against the sysroot), `EmscriptenSwiftSDK` (bundles the artifacts into a Swift SDK archive). - CLI flags `--build-emscripten-stdlib`, `--skip-test-emscripten-stdlib`, `--emscripten-path`. Default build flows are unaffected unless `--build-emscripten-stdlib` is passed. - `utils/wasm/emscripten-run.py` runner (Node.js), alongside `utils/wasm/wasi-run.py`. - `SwiftUtils.cmake` adds `is_wasm_sdk()` so `test/CMakeLists.txt` derives the per-SDK embedded test target instead of hardcoding WASI. - `stdlib/public/CMakeLists.txt` and `test/CMakeLists.txt` handle the `EMSCRIPTEN` SDK but stay inert until `SWIFT_EMSCRIPTEN_SYSROOT_PATH` is set, which only happens via `--build-emscripten-stdlib`.
Author
Loading