Repository navigation
Conversation
The Windows test wrapper, the test XML writer, the launcher and the launcher maker are now downloaded from per-platform archives built on Bazel CI rather than embedded into `@bazel_tools` for the host platform only. They are selected based on the execution and target platforms, so Windows tests can run and Windows launchers can be built from any host. The toolchains that build the launcher and the launcher maker from source and the deprecated `@bazel_tools//tools/launcher:launcher_maker` target are removed.
Execution platforms without a prebuilt launcher maker resolved the no-op toolchain, so building a Windows launcher on them failed. They now use `launcher_maker.sh`, which produces the same output as `launcher_maker.cc` and only requires a POSIX shell.
shasum isn't available on all Linux images.
fmeum
added a commit
to bazel-contrib/rules_shell
that referenced
this pull request
Nov 16, 2026
`sh_binary` and `sh_test` now get the launcher maker from the `@bazel_tools//tools/launcher:launcher_maker_toolchain_type` toolchain, as rules_java already does, instead of the deprecated `@bazel_tools//tools/launcher:launcher_maker` target, which bazelbuild/bazel#32632 removes. The `launcher_maker` attribute of `sh_toolchain` is now a no-op. The rules also opt into automatic exec groups, as the rules_java rules do. The execution platform of the launcher action is then selected for the launcher maker toolchain alone, independently of the shell toolchain, and `exec_properties` can target it with the `@@bazel_tools//tools/launcher:launcher_maker_toolchain_type.` prefix. The toolchain type exists in Bazel 8.3.0 and later, which covers all versions that use the Starlark rules by default. Work towards bazelbuild/bazel#19209
This branch has not been deployed
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.
Description
The Windows test wrapper (
tw.exe), the test XML writer (xml.exe), the launcher (launcher.exe) and the launcher maker are no longer embedded into@bazel_toolsfor the host platform only. Instead,@bazel_toolsdownloads them from per-platform archives,prebuilt_tools_<os>_<cpu>, defined next toremote_coverage_toolsintools/test/extensions.bzl. The Windows archives contain all four binaries, the macOS and Linux archives only the launcher maker. They are selected based on platforms rather than the host:@bazel_tools//tools/test:test_wrapperand:xml_writeruse the archive for the test's execution platform.launcher_toolchain_typetoolchains providelauncher.exefor each Windows target platform. Thelauncher_maker_toolchain_typetoolchains provide the launcher maker for each of the execution platforms listed below. Other execution platforms fall back tolauncher_maker.sh, a POSIX shell script that produces the same output.//src/tools/launcher:launcher_maker_sh_testcompares the two.Repositories are only fetched when needed, so builds that neither target nor execute on Windows don't download anything.
dummy.shis now embedded on all hosts, which allows Windows hosts to run tests on other platforms.The following are removed:
@bazel_tools@bazel_tools//tools/launcher:launcher_makertarget. rules_java and rules_python already uselauncher_maker_toolchain_typeon Bazel 9, and Use the launcher maker toolchain for Windows launchers bazel-contrib/rules_shell#79 does the same for rules_shell.launcher_test.testBuildLaunchersWithClangClOnWindows, which built the launcher from@bazel_toolssourcessrc/prebuilt_tools/upload.shbuilds the archive for one platform and uploads it togs://bazel-mirror/bazel_prebuilt_tools/tmp/<commit>/. It is meant to run in a Buildkite pipeline on these platforms:--config=windows_arm64src/prebuilt_tools/release.shthen promotes the archives and prints the version and hashes fortools/test/extensions.bzl. The shell and Python integration test harnesses override the host's archive with one built at the current commit, so changes to these tools are still covered by CI before a release.This is a draft until:
TODO)Motivation
Fixes #19209
Also addresses the host-specific
@bazel_toolscontents mentioned in #19587.Build API Changes
Yes
@bazel_tools//tools/launcher:launcher_makeris removed.@bazel_tools//tools/launcher:launcher_maker_toolchain_typetoolchain, which is available since Bazel 8.3.0.Release Notes
RELNOTES[INC]:
@bazel_tools//tools/launcher:launcher_makerhas been removed, use the@bazel_tools//tools/launcher:launcher_maker_toolchain_typetoolchain instead. The Windows test wrapper and launcher are now downloaded rather than embedded, so Windows tests can run and Windows launchers can be built from any host.