]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.22] cmd/go: fix build config before creating actions for 'go...
authorEhden Sinai <ehdens@gmail.com>
Thu, 1 Feb 2024 18:38:56 +0000 (13:38 -0500)
committerCarlos Amedee <carlos@golang.org>
Wed, 10 Jul 2024 19:27:29 +0000 (19:27 +0000)
commit49906f9575149afdf7e542fa24c7447c0ef78c49
tree3b948935333ad523f317e15f85c21777b7fe3f9e
parentea96074191e2fdd435c7f38ce0283bb868336122
[release-branch.go1.22] cmd/go: fix build config before creating actions for 'go list -cover'

When -covermode is set to atomic, instrumented packages need to import
sync/atomic. If this is not already imported by a package being
instrumented, the build needs to ensure that sync/atomic is compiled
whenever 'go list' is run in a way that triggers package builds.

The build config was already being made to ensure the import, but only
after the action graph had been created, so there was no guarantee that
sync/atomic would be built when needed.

For #65264.
For #68212
Fixes #68222

Change-Id: Ib3f1e102ce2ef554ea08330d9db69a8c98790ac5
Reviewed-on: https://go-review.googlesource.com/c/go/+/560236
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
(cherry picked from commit ac08c05d4daa11957fcada6db33f2150936bac27)
Reviewed-on: https://go-review.googlesource.com/c/go/+/595496
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/go/internal/list/list.go
src/cmd/go/testdata/script/cover_list.txt