cmd/go: add -cover flag to report by go version -m

Fixes #67366

Change-Id: Ie39a8ebe7fe2faf59a5f723c69d6d5c8e1a9cd8b
GitHub-Last-Rev: 021134582d
GitHub-Pull-Request: golang/go#67572
Reviewed-on: https://go-review.googlesource.com/c/go/+/587375
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
This commit is contained in:
Kioni
2024-05-22 17:57:32 +00:00
committed by Michael Matloob
parent 0ec709f180
commit 3989bc8a80

View File

@@ -2349,6 +2349,9 @@ func (p *Package) setBuildInfo(ctx context.Context, autoVCS bool) {
appendSetting("-ldflags", ldflags)
}
}
if cfg.BuildCover {
appendSetting("-cover", "true")
}
if cfg.BuildMSan {
appendSetting("-msan", "true")
}