Skip to content

bzlmod continued - #1

Merged
cburchert merged 4 commits into
cburchert:bzlmodfrom
lucidsoftware:bzlmod-part-2
Mar 5, 2025
Merged

cburchert merged 4 commits into
cburchert:bzlmodfrom
lucidsoftware:bzlmod-part-2

Conversation

@jjudd

@jjudd jjudd commented Mar 5, 2025

Copy link
Copy Markdown

The bulk of this PR is about using toolchains rather than select for bzlmod compatibility

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.


This PR also adjusts scripts/update_bazel_workspace.py to include linux_arm64 revisions and backfills linux_arm64 releases into revisions.bzl starting with releases after emscripten-core#547 was closed.

jjudd added 4 commits March 4, 2025 15:04
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.
…h_override

This way people won't need to check out the repo in order to use the
module.

return {
"//command_line_option:compiler": "emscripten",
"//command_line_option:crosstool_top": "@emsdk//emscripten_toolchain:everything",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crosstool_top stopped doing things in Bazel 7 without a flag: bazelbuild/bazel#21121

@cburchert

Copy link
Copy Markdown
Owner

Thanks! I will look a bit closer later today :)

@cburchert

Copy link
Copy Markdown
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!

@cburchert
cburchert merged commit 6606ba9 into cburchert:bzlmod Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants