-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[wasm][build] Build stdlib and test IRGen for WebAssembly #69101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wasm][build] Build stdlib and test IRGen for WebAssembly #69101
Conversation
b8630f1
to
e8a8f14
Compare
@swift-ci Please smoke test |
preset= buildbot_linux_crosscompile_wasm |
e8a8f14
to
2625f83
Compare
@swift-ci Please smoke test |
preset=buildbot_linux_crosscompile_wasm |
The stdlib compilation crash will be resolved after rebranch will be merged |
2625f83
to
6b391e4
Compare
I confirmed it passes with the llvm fix included in the rebranch #69239 |
preset=buildbot_linux_crosscompile_wasm |
6b391e4
to
f8c8dd9
Compare
caa9bf1
to
b022941
Compare
preset=buildbot_linux_crosscompile_wasm |
This patch adds a new build products to build and test the Swift stdlib for WebAssembly. This adds WebAssembly specific stdlib product instead of adding the new target in `stdlib-deployment-targets` because unlike darwin platforms Wasm target has quite different stdlib configuration from host target and there is no way to specify different stdlib configuration for each target in `stdlib-deployment-targets` for now. This patch adds 1 new dependency `wasi-libc` and 3 new build products: 1. `WASILibc` - wasi-libc is a libc implementation for WebAssembly System Interface (WASI). This product is required to build the compiler runtimes and Swift stdlib. 2. `WasmLLVMRuntimeLibs` - This product builds `./runtimes` directory in llvm-project, which contains compiler-rt, libcxx and libcxxabi. This product is required to build Swift stdlib. 3. `WasmStdlib` - This product builds standalone Swift stdlib for WebAssembly. (Similar to `MinimalStdlib` product, but configured for WebAssembly target)
@swift-ci Please smoke test |
b022941
to
641e753
Compare
preset=buildbot_linux_crosscompile_wasm |
@swift-ci Please smoke test |
641e753
to
f3455d8
Compare
Added a few test fix commits that are found after rebranch 🩹 |
preset=buildbot_linux_crosscompile_wasm |
@swift-ci Please smoke test |
stable/20230725 now rejects including builtin headers in modulemap by default to avoid module cycles on non-Apple platforms. Builtin headers are now part of their own `_Builtin_XXX` modules. See: - swiftlang/llvm-project#7618 - https://reviews.llvm.org/D159483 - https://reviews.llvm.org/D159064
To follow up changes in 5f037ef
f3455d8
to
977b74a
Compare
preset=buildbot_linux_crosscompile_wasm |
@swift-ci Please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩 Super excited to see this, thank you!
This patch adds new build products to build and test the Swift stdlib for WebAssembly.
This adds WebAssembly specific stdlib product instead of adding the new target in
stdlib-deployment-targets
because unlike darwin platforms Wasm target has quite different stdlib configuration from host target and there is no way to specify different stdlib configuration for each target instdlib-deployment-targets
for now.This patch adds 1 new dependency
wasi-libc
and 3 new build products:WASILibc
- wasi-libc is a libc implementation for WebAssembly System Interface (WASI). This product is required to build the compiler runtimes and Swift stdlib.WasmLLVMRuntimeLibs
- This product builds./runtimes
directory in llvm-project, which contains compiler-rt, libcxx and libcxxabi. This product is required to build Swift stdlib.WasmStdlib
- This product builds standalone Swift stdlib for WebAssembly. (Similar toMinimalStdlib
product, but configured for WebAssembly target)Currently
WasmStdlib
runs test suite undertest/IRGen
to verify the semi-target specific code in IRGen works and the generated IR can be processed by LLVM WebAssembly backend. Rest of test suites including executable tests are now skipped, but will be enabled after we set up a Wasm runtime in the CI infrastructure and calling convention mismatch issues will be resolved.Resolves rdar://116007434 and rdar://116523979.