]> Cypherpunks repositories - gostls13.git/commit
cmd/go: avoid link error when -coverpkg covers main packages (more)
authorJay Conrod <jayconrod@google.com>
Mon, 18 Mar 2019 22:35:44 +0000 (18:35 -0400)
committerJay Conrod <jayconrod@google.com>
Tue, 19 Mar 2019 14:23:16 +0000 (14:23 +0000)
commitd34548e0b6acc14a99bc6ffc225eedbb56e03d60
treeeb351d323e6cc94a81fc06557198319e83b7e768
parentfaa7fa03b1e694258d40f8f62076dd96843b861e
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 #30374

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>
src/cmd/go/internal/load/test.go
src/cmd/go/internal/work/exec.go
src/cmd/go/testdata/script/cover_pkgall_multiple_mains.txt