]> Cypherpunks repositories - gostls13.git/commit
cmd/dist, go/build: make CGO_ENABLED during make.bash sticky
authorRuss Cox <rsc@golang.org>
Mon, 17 Oct 2016 17:29:31 +0000 (13:29 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 17 Oct 2016 18:53:22 +0000 (18:53 +0000)
commit0ba3c607dfcc90072191375d57c4059be1ae96c7
treee430ecfaf639f5531908ef724115fee99454d30f
parent1e28dce80ad2ec195d55269266c5cca7ebd845a5
cmd/dist, go/build: make CGO_ENABLED during make.bash sticky

Per discussion on #12808, it's a bit odd that if you do

CGO_ENABLED=0 ./make.bash

then you get a toolchain that still tries to use cgo.
So make the CGO_ENABLED setting propagate into
the resulting toolchain as the default setting for that
environment variable, like we do with other variables
like CC and GOROOT.

No reasonable way to test automatically, but I did
test by hand that after the above command, 'go env'
shows CGO_ENABLED=0; before it showed CGO_ENABLED=1.

Fixes #12808.

Change-Id: I26a2fa6cc00e73bde8af7469270b27293392ed71
Reviewed-on: https://go-review.googlesource.com/31141
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/dist/buildgo.go
src/go/build/build.go