Repository navigation
bzlmod continued - #1
Merged
Merged
Conversation
By using toolchains and exec_compatbile_with we can use the correct toolchain for the execution platform. select was not operating on the exec platform, which meant that files weren't getting to the right places with bzlmod + Bazel 8. Toolchains are set up for all platforms that were previously supported. If you attempt to use a version of Emscripten that doesn't have an arm64 Linux build to build wasm on that platform, then it will error as it did previously.
…hem moving forward
…h_override This way people won't need to check out the repo in order to use the module.
jjudd
commented
Mar 5, 2025
|
|
||
| return { | ||
| "//command_line_option:compiler": "emscripten", | ||
| "//command_line_option:crosstool_top": "@emsdk//emscripten_toolchain:everything", |
Author
There was a problem hiding this comment.
crosstool_top stopped doing things in Bazel 7 without a flag: bazelbuild/bazel#21121
Owner
|
Thanks! I will look a bit closer later today :) |
Owner
|
This looks amazing. Thanks a lot for that work, I didn't have much time to follow up on my previous work and this helps both me and our wider community! |
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.
The bulk of this PR is about using toolchains rather than select for bzlmod compatibility
By using toolchains and
exec_compatbile_withwe can use the correct toolchain for the execution platform.select was not operating on the exec platform, which meant that files weren't getting to the right places with bzlmod + Bazel 8.
Toolchains are set up for all platforms that were previously supported. If you attempt to use a version of Emscripten that doesn't have an arm64 Linux build to build wasm on that platform, then it will error as it did previously.
This PR also adjusts
scripts/update_bazel_workspace.pyto includelinux_arm64revisions and backfillslinux_arm64releases intorevisions.bzlstarting with releases after emscripten-core#547 was closed.