Files
Max Desiatov 94b3e80470 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 redistributable 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 the `SWIFT_WASM_HOSTED_SDKS` registry and `sdk_has_wasm_sysroot()` 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`.
2026-06-08 12:50:41 +01:00
..