-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Replace --define=EXECUTOR=remote
with toolchains and selects
#26019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
--define=EXECUTOR=remote
with toolchains and select--define=EXECUTOR=remote
with toolchains and selects
dcff9af
to
fed82d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very smart, thanks!
/cc @pzembrod to take a look since this is affects C++ rules.
@bazel-io fork 8.3.0 |
The way launcher_maker is handled isn't quite correct. It probably needs to be depended on as a toolchain. I'll set this to draft for now. |
This allows for cross-platform builds to work seamlessly without a need to manually toggle between prebuilt and from source toolchains.
395a5e9
to
c682fca
Compare
@meteorcloudy I switched to a toolchain approach that rules_java, rules_python and rules_shell will be able to adopt via |
c682fca
to
43947a5
Compare
Nice, is it possible to write a test to verify that with this approach, C++ toolchain dependency won't be propagated by depending on the launcher? |
I would like to add such a test (as a Starlark analysis test) to the individual rulesets that adopt the toolchain, where it fits better semantically by more generally verifying that cross-compilation works without a C++ toolchain. |
This allows for cross-platform builds to work seamlessly without a need to manually toggle between prebuilt and from source toolchains. As a positive side effect, this change also paves the way for dropping a dependency on an exec-configured C++ toolchain of Java and Python targets built for non-Windows platforms. Rulesets will need to migrate to using the launcher maker toolchain instead of the `launcher_maker` target. rules_shell wasn't affected by this as it already defined its own launcher toolchain. Work towards #19587 Closes #26019. PiperOrigin-RevId: 758697189 Change-Id: Ibfa272390056963ef35301614520fd38d018210e (cherry picked from commit e819495)
This allows for cross-platform builds to work seamlessly without a need to manually toggle between prebuilt and from source toolchains.
As a positive side effect, this change also paves the way for dropping a dependency on an exec-configured C++ toolchain of Java and Python targets built for non-Windows platforms. Rulesets will need to migrate to using the launcher maker toolchain instead of the
launcher_maker
target. rules_shell wasn't affected by this as it already defined its own launcher toolchain.Work towards #19587