-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
exec_compatible_with targets which can be built but don't match --platforms cause errors #11729
Comments
I'm unclear what you are asking for here. We have plans at some point to allow targets to specify their own target platform, and this will work with the current work for target platform compatibility in #10945. In general, with multi-configuration builds, trying to build |
Yeah, having targets able to specify their own target platforms is really what I'm looking for - so if I'm building for Linux, but have a target which wants to build targeting MacOS, and my execution config would allow that, it will build despite my configuration. Is there an issue or something tracking that? It feels potentially separate to #10945 (but I could see how they'd end up in the same PR) |
We don't have plans to implement this at the current time, because we are worried about the effect in large repos (such as google's internal repo). I think the solution in #10945 will fix this for you by allowing you to specify target constraints and skip building invalid targets. |
That would be sufficient for us to work around not being able to |
That makes sense. I found the roadmap item for this feature: #6519. As I said, we don't currently have a plan to implement this in the near future. |
Fantastic, thanks - closing as duplicate of #6519 (even if it has no short-term plans :)) |
Given this BUILD file:
Running:
tells me:
Accordingly, it appears I need to tag these as manual, and explicitly build each one in its own invocation of Bazel with the right
--platforms
flag set.I know that #10945 intends to skip incompatible targets, but are there plans to be able to build compatible-but-distinctly-configured targets? As far as I can tell if these are in the middle of the graph (i.e. some rule depends on them both), this works fine, but if they're explicit roots of the graph, it fails.
The text was updated successfully, but these errors were encountered: