Update wasi-sdk to v34
Categories
(Firefox Build System :: Toolchains, task)
Tracking
(firefox157 fixed)
| Tracking | Status | |
|---|---|---|
| firefox157 | --- | fixed |
People
(Reporter: RyanVM, Assigned: RyanVM)
References
Details
Attachments
(1 external file)
| Assignee | ||
Comment 1•5 months ago
|
||
wasi-sdk-33 builds its sysroot through its own cmake build system rather than the Makefile we
previously drove with stub files, so the build scripts are rewritten accordingly and the separate
compiler-rt and sysroot scripts are merged into a single build-wasi-sdk.sh selected by a mode
argument. The local patches to wasi-sdk are split into focused files (compat, compiler-rt,
no-llvm-patches), each documenting its rationale in a header comment.
The build pins WASI_SDK_BUILD_SHARED and WASI_SDK_EXCEPTIONS to OFF: Firefox's wasm sysroot doesn't
ship or link against shared libraries, and the wasm code doesn't use C++ exceptions.
The target triple is also moved from the deprecated wasm32-wasi to wasm32-wasip1, with compatibility
symlinks left in the sysroot so consumers still using the old triple keep building.
| Assignee | ||
Comment 2•5 months ago
|
||
Following up on your comment in bug 2039812 about separating out the wasip1-related changes: I tried to find a clean split and couldn't land on one that isn't more convoluted than the combined patch, so I'd like to pin down what you'd prefer before reworking.
The constraint is that the wasm32-wasip1 sysroot layout is produced by the wasi-sdk-33 build itself. wasi-sdk-20 only ships the wasm32-wasi layout, so the clang-trunk wasip1 link check (bug 2039812) can't pass without the v33 bump. The existing clang>=22.1 elif in toolchain.configure already makes clang-trunk target wasm32-wasip1; the piece that was missing was a sysroot that actually has that layout.
Given that, the approach here is:
- Update to wasi-sdk-33, which builds through its own cmake system rather than the Makefile we previously drove with stub files, producing a native wasm32-wasip1 sysroot.
- Move wasm() to wasm32-wasip1 and drop the now-redundant clang>=22.1 elif, since every supported clang then targets the same triple.
- Keep wasm32-wasi -> wasm32-wasip1 symlinks in the sysroot so anything still referencing the old triple keeps building.
The configure-side bits (the wasm() move and the elif removal) are the most readily separable, but on their own they don't fix 2039812, and pulling them out would leave an awkward intermediate state without the v33 sysroot underneath them.
You mentioned you'd likely address the wasip1 changes differently than the WIP did. I'm happy to restructure or split it however you'd like, but could you point at what specifically you'd change (the unconditional wasm() move? the symlinks? something else?) so I can take it in that direction rather than guess?
| Assignee | ||
Comment 3•4 months ago
|
||
Updated on top of the recent clang update and minimum version bump.
https://treeherder.mozilla.org/jobs?repo=try&revision=f1de96d9c97ee880b5099c10d65a5ccb78161b5b
| Assignee | ||
Comment 4•4 months ago
|
||
Updated Try push after addressing the first round of review comments.
https://treeherder.mozilla.org/jobs?repo=try&revision=43db5cc0838e73cd8843307a4599de93dd39dd88
Updated•4 months ago
|
| Assignee | ||
Updated•2 months ago
|
Updated•2 months ago
|
| Assignee | ||
Comment 5•2 months ago
|
||
Updated Try push: https://treeherder.mozilla.org/jobs?repo=try&revision=52e45ae579f3ddccf668a2b27f04e76a2dd6f808 (all failures are known preexisting ones)
Updated•2 months ago
|
Comment 7•2 months ago
|
||
| bugherder | ||
Description
•