-
Notifications
You must be signed in to change notification settings - Fork 137
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
Applying swift.opt_uses_osize recursively to dependencies #492
Comments
You should pass |
this would apply globally though, no? which would include apps that we want to use |
If you had 2 apps, one that wanted this and one that didn't, and they shared dependencies, and you built both at the same time, what flags would the shared dependencies get? or would you build them twice? |
they would be built twice |
I don't think bazel has the ability to do this kinda thing 🤔 without maybe creating a macro that created 2 underlying rules, one for each config |
For us passing the top level feature works because we never build multiple prod versions of the app in the same invocation |
i see, yeah i guess invocation level will do what i want. i just didn't want .bazelrc since then it would apply across multiple invocations. i think it's an adequate solution |
Yea makes sense. I do think there's room for a bazel improvement here |
This is exactly what configuration transitions are for |
how would that setup look? |
It doesn't work with features (they don't propagate down), but you could define a starlark build flag that's used in a transition and then read in a rule implementation |
I wonder if any other languages solve this in bazel?
|
It's how things like CPU and deployment target are propagated for C++/Swift. |
Sorry I meant more for optimization stuff |
Typically when my co-workers and I are picking between
-O
and-Osize
, we think about it at the app level and not the module level. If one wants to use-Osize
, they would generally want to use it everywhere and not just for specific modules. However, it seems like when this feature is applied to a swift rule, it only affects that rule, and not its recursive dependencies. It would be nice to have some way for the feature to propagate to them.The text was updated successfully, but these errors were encountered: