-
-
Notifications
You must be signed in to change notification settings - Fork 656
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
Set gc_goopts for all targets in a build #2402
Comments
Unfortunately, there's no way to do this at the moment. I'll re-title this issue as a feature request.
It probably makes the most sense to implement this using build settings and configuration transitions, so consider this blocked on #2219. I have a prototype for that mostly working, but it still needs to be cleaned up and productionized. |
Note that there is also the consideration of specific configuration transitions (not sure if this is the right term?). i.e., setting |
@prattmic I think that's right, setting We'll basically have two lists of flags: those specified in the configuration (using |
What version of rules_go are you using?
0.22.1
What version of gazelle are you using?
0.20.0
What version of Bazel are you using?
2.1.1
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Linux amd64
Any other potentially useful information about your toolchain?
Trying to build a go_binary as a c-archive with all dependencies build with gc_goopts=-d=libfuzzer
What did you do?
So I tried setting
gc_goopts="-d=libfuzzer"
on my go_binary target, but this flag is only applied at compile time to that specific target. So I need to apply this flag to all libraries / dependencies up to this target.I have tried a simple bazel build setting flag like
--define=gc_goopts=-d=libfuzzer
, but this is not supported in rules_go. I've considered a transition rule, but I'm not sure it could be applied here.What do you recommend as the best approach to support this functionality?
This is part of #2284, which I managed to get working, but missing some coverage symbols since
-d=libfuzzer
is not applied to all targets.The text was updated successfully, but these errors were encountered: