-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: go test -c
does not respect gcflags sometimes [1.11 backport]
#28346
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
Comments
Approved since this is a regression. Please follow the instructions at https://github.com/golang/go/wiki/MinorReleases to create the cherrypick CL. |
Removed the approved label since the original CL has not been merged yet. Once it is, and the issue is closed, this can be re-approved assuming it is still appropriate for backport. |
Bumping to Go 1.11.3 since there's no fix on master yet. |
I cannot tell from the Github issues what patch version of go1.11 the backport resolution of this issue is slated for. I would like to know when this will be/is fixed. The most recent comment from @bradfitz suggests 1.11.3, but 1.11.4 has already been released. |
There is still no fix on master. |
The change has been fixed on master, approved the cherry pick after speaking with @jayconrod. Sounds like this meets the backport criteria of being a serious issue with no workaround. |
@aarzilli Would you mind creating a cherry-pick CL, following the procedure at Making cherry-pick CLs? I'd be happy to review and approve again. |
Change https://golang.org/cl/156377 mentions this issue: |
Closed by merging e39e43d to release-branch.go1.11. |
Fixes bug introduced by https://golang.org/cl/129059 where gcflags='all=...' and ldflags='all=...' would not be applied to some packages built by 'go test'. LoadImport used to set gcflags/ldflags for the Package objects it created, in https://golang.org/cl/129059 this code was factored out to setToolFlags. The codepath of `go build` was updated to call setToolFlags appropriatley, but the codepath of `go test -c` wasn't, resulting in gcflags/ldflags being applied inconsistently when building tests. This commit changes TestPackagesFor to call setToolFlags on the package objects it creates. Fixes #28346 Change-Id: Idcbec0c989ee96ec066207184611f08818873e8d Reviewed-on: https://go-review.googlesource.com/c/136275 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> (cherry picked from commit 374546d) Reviewed-on: https://go-review.googlesource.com/c/156377 Run-TryBot: Alessandro Arzilli <alessandro.arzilli@gmail.com>
@ianlancetaylor requested issue #27681 to be considered for backport to the next 1.11 minor release.
The text was updated successfully, but these errors were encountered: