Repository navigation
build(release): cross-compile the release tools in presubmit - #4262
Merged
rickeylev merged 6 commits intoOct 15, 2026
Merged
Conversation
Presubmit only built the release tools for each CI host's own platform, so 8 of the 11 platforms in dev/platforms were only built when the release workflow ran. A new target, //dev/release_artifacts:cross_compiled_artifacts, builds the tools for the platforms that the host can cross-compile for, with a split transition on --platforms. BazelCI's default builds of //... on Linux x86_64, macOS arm64, and Windows x86_64 thus cover all 11 platforms without new jobs. BazelCI has no Windows Arm machines, so Windows x86_64 hosts also get a Rust toolchain for Arm Windows. Arm Windows needs Visual Studio's optional ARM64 build tools. A config setting detects them through toolchain resolution, so Windows machines without them skip that platform instead of failing. BazelCI's Windows jobs set --//dev/release_artifacts:require_msvc_arm64 to make missing tools an error there. On Linux x86_64, developers' machines included, builds of //... now also cross-compile the 5 musl variants. The release workflow still builds aarch64-pc-windows-msvc and x86_64-apple-darwin natively. Work towards bazel-contrib#4216
Name the strict MSVC ARM64 flag in the shared .bazelrc's ci config, which BazelCI's default Windows jobs now pass, instead of in presubmit.yml. Also recognize all of rules_cc's error scripts in the toolchain probe, and apply wording fixes from code review.
Keep the release build rules in one file: the cross_compiled_files rule and its transition move unchanged into release_files.bzl, and cross_compiled_files.bzl and its bzl_library are removed.
BazelCI's test step and --config=fast-tests build only tests and their dependencies, so add a build_test for //dev/release_artifacts:cross_compiled_artifacts.
rickeylev
force-pushed
the
bazelci_cross_release_artifacts
branch
from
October 14, 2026 20:52
e093946 to
56c566c
Compare
aignas
approved these changes
Oct 14, 2026
Only the Windows jobs passed --config=ci, so the CI settings in .bazelrc applied to them alone. The shared build and test flag sets now include it, so every default and RBE bzlmod job uses it in both steps, which keeps `bazel test` reusing the build's analysis cache. A new reusable_config_test_flags anchor mirrors the build one. The Windows and rolling jobs merge it; the RBE jobs, which set their own flags, list --config=ci explicitly.
The RBE jobs listed --config=ci by hand. Merging the shared flag sets instead keeps them in sync with the other jobs; rbe_min thereby also gains --keep_going and --verbose_failures.
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.
Presubmit built the release tools only for each CI host's own platform,
so 8 of the 11 platforms in dev/platforms were built only when the
release workflow ran.
A new target, //dev/release_artifacts:cross_compiled_artifacts, builds
the tools for the platforms that the host can cross-compile for, with a
split transition on --platforms. BazelCI's default builds of //... on
Linux x86_64, macOS arm64, and Windows x86_64 thus cover all 11
platforms without new jobs. BazelCI has no Windows Arm machines, so
Windows x86_64 hosts also get a Rust toolchain for Arm Windows.
On all three hosts, developers' machines included, builds of //... now
also cross-compile, e.g. the 5 musl variants on Linux x86_64. The
release workflow still builds aarch64-pc-windows-msvc and
x86_64-apple-darwin natively.
Work towards #4216