-
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
Change platforms based on command line flags #19786
Comments
Several questions, really:
To clarify point two, you could have two
This lets your flag to control "musl" be completely orthogonal to your platform definitions. |
Unfortunately, we need to add the constraints inside a transition.
We're not using the platform specified in the CLI. We're using it to say "build a binary for {{platform}} to later be bundled into this platform" through a transition, which might be different from either the exec or host platforms.
Probably "choice of linker" was not the best wording for our aim here. We want to tell |
See the design for standard platform transitions. This is currently being implemented, but the basic idea is that you (or your users) would tell rules_docker what specific platform to build for. |
Just read the proposal. It very helpful. It wouldn't let us toggle musl on or off from the command line (afaict platforms are still not configurable), but it will get us most of the way there. Do you know if this will be implemented when Bazel 7 releases? |
We're placing the new rules in the https://github.com/bazelbuild/platforms/ repository, so they're not bundled in Bazel at all. I believe the |
Good to know, thanks. I'll close this issue, as I don't think there are any more action items. Thanks again for your help! |
@katre We've continued testing on this, and saw that it breaks |
It's unfortunate that If anyone who is using |
Cc @alexeagle |
Description of the feature request:
I am testing the latest prerelease, 7.0.0-pre.20230926.1, and I'm finding that commit 87fb46 broke one of our workflows.
We want to make a platform that you can transition to depending on a command line flag (in particular, whether you want to use a musl linker). In the past, we did it like:
Understandably, the new commit means that label_setting can't derive its
actual
from the configuration. However, I'm not really sure how to proceed while the rest of Implement Platform-Based Flags #19409 is implemented. Is this something we should change in label_setting, or should we work around it some other way?Which category does this issue belong to?
Configurability
What underlying problem are you trying to solve with this feature?
I would like to be able to configure a platform (as the target for a transition) based on a command line flag. Currently, in the
rolling
release, there seems to be no way to do so.Which operating system are you running Bazel on?
macOS, but would like to configure the platform
What is the output of
bazel info release
?release 7.0.0-pre.20230926.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
Asked on Slack: https://bazelbuild.slack.com/archives/CDCMRLS23/p1696954138130789
Any other information, logs, or outputs that you want to share?
cc\ @katre , since they're the ones driving the work forward.
The text was updated successfully, but these errors were encountered: