-
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 should be able to be passed platforms #25363
Comments
The reason to not accept a platform is because constraints exist as an indirection between specific platforms and generic capabilities. Targets and toolchains should clarify what capabilities they require (using In addition, the semantics are potentially confusing. Given the following, which platform can be used?
There are plausible arguments both for and against the platforms I could see an argument for a rule that wraps the |
I think what you said makes sense. I think It'd make more sense to just put a provider wrapping
This would resolve your above problems by making it explicitly depending on the constraints of the platform rather than the platform.
|
Description of the feature request:
exec_compatible_with takes in a list of
ConstraintValueInfo
. A platform is simply a list of constraint values, so there's no reason you shouldn't be able to pass a platform in instead.Which category does this issue belong to?
Configurability
What underlying problem are you trying to solve with this feature?
This would simplify toolchain definition, as you'd now be able to specify:
This would allow you to automatically keep the toolchain definitions in line with your execution platform definitions.
Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?8.1.0
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 HEAD
?Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: