-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Stdlib is built 4 times #3535
Comments
We can force any of these settings. Since only a tiny fraction of the stdlib is C, maybe we always want to build it with |
yeah, we can force "opt" that except in dbg mode, where it may remove some symbols needed for debug. What I wonder is why there are both cgo on and off configurations. Instead of forcing either cgo on or off, I think we should remove the additional transition. |
I just apply the patch below to force
|
Yes, for these differences getting rid of a separate I think that the best we can do for now is to get the count down to a single |
For almost all
go_library
targets, rules_go builds 4 copies for stdlib: fastbuild vs opt (for tools), and cgo on vs. off. This happens togo_library
targets that don't depend on cgo, e.g.,@bazel_gazelle//cmd/gazelle:gazelle_lib
. Also, I don't see a reason why we need to build stdlib for tools with both cgo on and off.What version of rules_go are you using?
0.39.0
What version of gazelle are you using?
master branch
What version of Bazel are you using?
6.1.1
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
macOS arm64
Any other potentially useful information about your toolchain?
What did you do?
Check out Gazelle repo and run
bazel aquery 'mnemonic(GoStdlib, deps(//cmd/gazelle:gazelle_lib))'
What did you expect to see?
There are only 1-2
GoStdlib
actionsWhat did you see instead?
4
GoStdlib
actions, for fastbuild vs opt, and cgo on and offThe text was updated successfully, but these errors were encountered: