]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.12] cmd/go: avoid link error when -coverpkg covers main packages...
authorJay Conrod <jayconrod@google.com>
Mon, 18 Mar 2019 22:35:44 +0000 (18:35 -0400)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 5 Apr 2019 19:08:44 +0000 (19:08 +0000)
commit4fc9d3bc58413861f2012c24065ce3f7ed9df4db
tree512ac5e06499243fc8a8597c88e54ef037608c4a
parent92e78f7e8d1bc92cb91d18e912ee20076a4747aa
[release-branch.go1.12] cmd/go: avoid link error when -coverpkg covers main packages (more)

This fixes two problems missed in CL 164877.

First, p.Internal.BuildInfo is now part of the cache key. This is
important since p.Internal.BuildInfo causes the build action to
synthesize a new source file, which affects the output.

Second, recompileForTest is always called for test
packages. Previously, it was only called when there were internal test
sources, so the fix in CL 164877 did not apply to packages that only
had external tests.

Fixes #30937

Change-Id: Iac2d7e8914f0313f9ab4222299a866f67889eb2e
Reviewed-on: https://go-review.googlesource.com/c/go/+/168200
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit d34548e0b6acc14a99bc6ffc225eedbb56e03d60)
Reviewed-on: https://go-review.googlesource.com/c/go/+/168717
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/internal/load/test.go
src/cmd/go/internal/work/exec.go
src/cmd/go/testdata/script/cover_pkgall_multiple_mains.txt