For example, building on a Mac where some tools execute on the Mac and others execute on a remote Linux machine.
This tracks a Blaze configurability roadmap effort.
Came across this looking to build and bundle together binaries, one for each platform, some of which would need to get built remotely. This would be awesome for that!
Could I ask what use case originally inspired this feature request?
Also, @gregestren: I was just building on some of your great examples around transitions. Thank you for those!
We have mixed-backend builds we'd like to do, mostly around developers who are working on Mac laptops but want to use the Linux remote build backends, so we'd like to get that moving. There's a lot of cruft to clean up first, though, so I'm not sure when we'll be moving forward.
Mixed binaries like you want can be done with transitions, however, so I am glad you found the examples for those helpful.
We have successfully run some builds where Bazel runs on a Mac and the build runs on Linux, although that required a patch to the bazel-toolchains repository which currently looks at the local host to determine the remote host (which is obviously incorrect in this case).
Thanks, both of you, for replying.
@katre, just to confirm, I can't currently use transitions to have parts of the graph build remotely, right? That's what it seemed like from my experience playing around with transitions, and this seemed like the issue that would lead to the change from reading the design doc (link if anyone else is looking). But your comment seemed to say otherwise? Just to make it concrete: imagine building on a Mac, where you can locally (cross)compile the binary for macOS, iOS, Android (using transitions), but want to compile for Windows, Linux remotely. Or equivalently compiling from Linux, able to build for Linux, Android locally, but needing to compile for iOS, macOS, Windows remotely.
@cpsauer, even if you could, the code still has other problems. In particular, it looks at the OS that Bazel runs on to select things like path style (windows with backslashes vs. linux/mac with forward slashes). Right now, even running Windows actions remotely from a Linux/Mac machine (and vice versa) is not working.
Sorry, I meant that you can use transitions to build the bundle of libraries for different platforms, _if_ they can all be built on the same platform in individual Bazel invocations. The updates to execution strategy that would be needed for mixed local/remote builds is still in the planning phase.
Thanks all. Remote builds and tests that trancend platforms... what an awesome goal.
Closing this as a dupe of #11432, follow that as the official tracking issue for this effort.