mirror of https://github.com/golang/go.git
[release-branch.go1.4] make.bash: set CGO_ENABLED=0
cgo is not supported with 1.4. In addition to (perhaps instead of) documenting it, just enforce it in make.*. Updates Homebrew/homebrew-core#18465 Change-Id: Iefb1860890d9ec525597b6d730e2189110818598 Reviewed-on: https://go-review.googlesource.com/124076 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
4d5426a570
commit
94221a0612
|
|
@ -106,6 +106,13 @@ if [ "$(uname -s)" == "GNU/kFreeBSD" ]; then
|
|||
export CGO_ENABLED=0
|
||||
fi
|
||||
|
||||
# cgo is not generally supported on 1.4.
|
||||
# Disable unless explicitly requested.
|
||||
# See also https://github.com/Homebrew/homebrew-core/issues/18465.
|
||||
if [ "$CGO_ENABLED" == "" ]; then
|
||||
export CGO_ENABLED=0
|
||||
fi
|
||||
|
||||
# Clean old generated file that will cause problems in the build.
|
||||
rm -f ./runtime/runtime_defs.go
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,12 @@ setlocal
|
|||
|
||||
set GOBUILDFAIL=0
|
||||
|
||||
:: cgo is not generally supported on 1.4.
|
||||
:: Disable unless explicitly requested.
|
||||
if not x%CGO_ENABLED%==x goto cgodone
|
||||
set CGO_ENABLED=0
|
||||
:cgodone
|
||||
|
||||
if exist make.bat goto ok
|
||||
echo Must run make.bat from Go src directory.
|
||||
goto fail
|
||||
|
|
|
|||
|
|
@ -45,6 +45,11 @@ rm -f ./runtime/runtime_defs.go
|
|||
# Determine the host compiler toolchain.
|
||||
eval `{grep '^(CC|LD|O)=' /$objtype/mkfile}
|
||||
|
||||
# cgo is not generally supported on 1.4.
|
||||
# Disable unless explicitly requested.
|
||||
if(~ $CGO_ENABLED '')
|
||||
CGO_ENABLED = 0
|
||||
|
||||
echo '# Building C bootstrap tool.'
|
||||
echo cmd/dist
|
||||
GOROOT = `{cd .. && pwd}
|
||||
|
|
|
|||
Loading…
Reference in New Issue