Repository navigation
The native compiler carries the wasm32 runtime (#2131 layer 3) - #2264
Merged
Merged
Conversation
…links outside the repository (#2131 layer 3) A wasm32 link found its five runtime objects only under <runtime root>/cross/wasm32, which exists only in a tree after `:cross-rt-wasm`; outside the repository the installed compiler reported them missing. - build: stage1 compiles the wasm32 runtime (rt_core, rt_wasm, compat, panic, fiber stubs) into out/bootstrap/lib/cross/wasm32 beside the native objects, and the stage embed carries them as `wasm32_<stem>_o` blobs; `:cross-rt-wasm`'s objects are compiled by stage2 rather than the release (as the release's own native runtime objects are), so the release embed carries them too. The bootstrap embed and the four cross compilers' embeds define the same symbols as empty blobs. One list of the five objects (parallel lists built with push: the build layer runs on the pinned seed, whose evaluator has neither `for` destructuring nor `len()` on a collection literal, #1122). - Link.w: `link_stage_embedded_runtime_object` knows the objects by their cross path; `link_stage_find_runtime_object_path` extracts them for a wasm32 link when no cross/wasm32 directory holds them, under the same generation check as the native fallback, into <artifact root>/tmp/with_runtime/cross/wasm32. Verified with the pinned seed: full build green; `nm` shows the runtime symbols in the release; with out/lib/cross/wasm32 moved aside, `hello.w --target wasm32` from the tree extracted the embedded objects and ran under node; a std.regex program links with no WITH_RUNTIME_ROOT (and still returns false for every match: item 4, unchanged); `:wasm-tests` 6 files ok on the stage2-built objects. No casts added; the loops index with the i64 len() returns.
Contributor
Author
|
Battery GREEN on df39fa3 (tools/battery.w: gate green, uat 21s, battery-checks 793s; status.txt has no RED). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See the commit. The release embeds the five wasm32 runtime objects (stage1's for the stage embed, stage2's for the release embed), and the link stage extracts them for a wasm32 link when no cross/wasm32 directory holds them. Verified by hiding the directory and linking hello.w, which ran under node; :wasm-tests 6 ok. Item 4 (every match false on wasm32) is untouched. Gate and battery to follow.