]> Cypherpunks repositories - gostls13.git/commit
cmd/go: correctly report that -msan needs CGO_ENABLED=1
authorEmmanuel Odeke <emm.odeke@gmail.com>
Thu, 14 Sep 2017 23:16:58 +0000 (17:16 -0600)
committerEmmanuel Odeke <emm.odeke@gmail.com>
Fri, 15 Sep 2017 00:11:18 +0000 (00:11 +0000)
commit33cb1481f26c6f1acca445fafa18e7ad1d49efed
treeb8ac069936fb2ec5c173ecd20baddb89f9696ec2
parent95b146e8ebf1687503fcf105f16e1f1eb0ea135e
cmd/go: correctly report that -msan needs CGO_ENABLED=1

Previously, if CGO_ENABLED=0 was set when building
with -msan, the error message printed was:

  -race requires cgo; enable cgo by setting CGO_ENABLED=1

yet the instrumentation flag passed in was -msan. This CL
fixes that message to correctly report that -msan needed
CGO_ENABLED=1, and likewise if -race, report -race needed it.

Fixes #21895

Change-Id: If423d520daae7847fb38cc97c3192ada5d960f9d
Reviewed-on: https://go-review.googlesource.com/63930
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/go/go_test.go
src/cmd/go/internal/work/build.go