1
0
mirror of https://github.com/golang/go synced 2024-11-11 21:40:21 -07:00

cmd/vet/all: disable cgo when running 'go install'

Change-Id: Iab1e84624c0288ebdd33fbe83bd60948b5d91fc4
Reviewed-on: https://go-review.googlesource.com/37612
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2017-02-28 15:24:18 -08:00 committed by Brad Fitzpatrick
parent e73f489494
commit 09294ab754

View File

@ -221,7 +221,7 @@ func (p platform) vet(ncpus int) {
w := make(whitelist)
w.load(p.os, p.arch)
env := append(os.Environ(), "GOOS="+p.os, "GOARCH="+p.arch)
env := append(os.Environ(), "GOOS="+p.os, "GOARCH="+p.arch, "CGO_ENABLED=0")
// Do 'go install std' before running vet.
// It is cheap when already installed.