• Russ Cox's avatar
    cmd/dist, go/build: make CGO_ENABLED during make.bash sticky · 0ba3c607
    Russ Cox authored
    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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    0ba3c607
Name
Last commit
Last update
..
README Loading commit data...
build.go Loading commit data...
buildgo.go Loading commit data...
buildruntime.go Loading commit data...
buildtool.go Loading commit data...
cpuid_386.s Loading commit data...
cpuid_amd64.s Loading commit data...
cpuid_default.s Loading commit data...
deps.go Loading commit data...
main.go Loading commit data...
mkdeps.bash Loading commit data...
sys_default.go Loading commit data...
sys_windows.go Loading commit data...
test.go Loading commit data...
util.go Loading commit data...
util_gc.go Loading commit data...
util_gccgo.go Loading commit data...
vfp_arm.s Loading commit data...
vfp_default.s Loading commit data...