-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/go: -gcflags and cached packages #19340
Comments
This looks related to the discussion in issue #14319, in particular this comment about making
Looks like the discussion in the old thread stalled, though. (And that issue is in the unplanned milestone) |
That comment wouldn't fully solve the problem however, even if build didn't mix packages built with and without -N it still couldn't build runtime with -N. |
Related (possible dup?): #18369 |
Work on better caching will fix this. I have a prototype. Not for Go 1.9 but probably for Go 1.10. |
Great, thank you. I should mention that last week I've discovered that on tip now I can build with both |
Change https://golang.org/cl/73212 mentions this issue: |
Delve builds its binaries using
-gcflags='-N -l'
to disable inlining and optimizations. This works well until the user separately does ago install
or ago build -i
at which point any subsequent build will pick up the cached version of all unchanged dependencies, built with optimizations turned on, leading to surprising behavior.Attempting to circumvent this problem by passing
-a
to build fail because of #18774.Considering that #18774 has existed for a while (the first reference I found is #12055) would it be possible to make build pick up cached packages only when compiler flags match, making an exception for runtime?
The text was updated successfully, but these errors were encountered: