Path Questions w/ Multiple Platforms

8 views
Skip to first unread message

Eric Stoces

unread,
4:06 AM (5 hours ago) 4:06 AM
to bazel-discuss
I have multiple platforms and toolchains, including VxWork 6.9 and VxWorks 7.0.  Both of these build on Window.  Both are put in the same bazel-out directory structure `bazel-out/x64_windows_fastbuild/...`.  So each build of a library for the given platform overwrites the other.  How do I get Bazel to understand these are different platforms/toolchains and should be stored accordingly.

Thanks

David Turner

unread,
8:05 AM (1 hour ago) 8:05 AM
to Eric Stoces, bazel-discuss
On Thu, Oct 16, 2025 at 10:06 AM Eric Stoces <ewst...@gmail.com> wrote:
I have multiple platforms and toolchains, including VxWork 6.9 and VxWorks 7.0.  Both of these build on Window.  Both are put in the same bazel-out directory structure `bazel-out/x64_windows_fastbuild/...`.  So each build of a library for the given platform overwrites the other.  How do I get Bazel to understand these are different platforms/toolchains and should be stored accordingly.


One way is to use `--platform-suffix` to append a specific suffix to the configuration output directory. But this assumes you will never use both VxWorks 6.9 and VxWorks 7.0 in the same build command.

Generally speaking, you don't control the Bazel output configuration-specific directory, unless you use transitions (and even there, the name is unpredictable) :-/

The name you are seeing here (x64_windows_fastbuild in this example) is currently a Bazel implementation detail, computed from command-line options like --cpu, --platforms or --compilation_mode and probably a few others which can change between Bazel releases. Also, when transitions exist in your configured graph, each new build configuration instance will gets is new output configuration directory, but with very unpredictable names like k8-fastbuild-ST-edfdb45b22e6.

There is an open Github issue to change this logic to more predictable scheme in the future, but don't hold your breadth :-)

Hope this helps,

- Digit
 
Thanks

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bazel-discuss/d997b523-b041-440d-af93-3363db307aafn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages