-
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
Is there any way to exclude certain targets from "all" under certain conditions? #1619
Comments
@lberki if I understand correctly, we don't have such a feature? |
No, we don't. The parsing of What may work is to create a target in place of
This, of course, requires an explicit list of targets, which is not optimal. |
Um, then here's another question: is there any plan to support nested selects? As far as I understand it, allowing selects to nest does not naturally produce O(n^2) behavior, nor will cause any inefficiency, as long as the selects are properly used. So it does not naturally contradict with any Bazel philosophy. Allowing selects to nest would make my helper functions transparent. |
Sorry. I just noticed I cannot re-open this issue, and my last question has strayed too far from the main topic. Therefore, I opened another at #1623 . |
Note we have some support for CPU-based skipping now: https://groups.google.com/d/msg/bazel-discuss/U6sFbPWiXGM/_hjddzwdFwAJ |
Is there any way to exclude certain targets from "all" under certain conditions?
By conditions I mean the
config_setting
s that could be used in select(). For example, most of my code could be cross-platform but a certain library would bex86_64
-only. Is there a recommended way to mark thatx86_64
-only library so that I canbazel build //...:all --cpu=armv7a
without worrying about that one library?Currently I'm using a wrapper function which basically wraps everything with select:
where
if_x86_64
is a function that returns a select. So when building underarmv7a
, thisx86_64
-only library becomes an empty one and will not create any error.However, this approach doesn't work well because select cannot be included inside another select.
So, is there any mechanism that I overlooked that could be used to help the situation? If not, will recursive select be supported in some future version of bazel?
The text was updated successfully, but these errors were encountered: