build: clear GO111MODULE during make.bash etc

The standard build assumes the variable is unset.
Make it so, like we do for GOFLAGS, GOBIN, and so on.

Change-Id: I4ad5695f8021b08bd1a35dd99112970a813d247c
Reviewed-on: https://go-review.googlesource.com/c/149959
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Russ Cox 2018-11-16 12:47:33 -05:00 committed by Brad Fitzpatrick
parent 55e1fc930b
commit 2a07c50a5c
6 changed files with 6 additions and 0 deletions

View File

@ -64,6 +64,7 @@ set -e
unset GOBIN # Issue 14340
unset GOFLAGS
unset GO111MODULE
if [ ! -f run.bash ]; then
echo 'make.bash must be run from $GOROOT/src' 1>&2

View File

@ -48,6 +48,7 @@ setlocal
set GOBUILDFAIL=0
set GOFLAGS=
set GO111MODULE=
if exist make.bat goto ok
echo Must run make.bat from Go src directory.

View File

@ -48,6 +48,7 @@ if(~ $1 -v) {
}
GOFLAGS=()
GO111MODULE=()
GOROOT = `{cd .. && pwd}
if(! ~ $#GOROOT_BOOTSTRAP 1)
GOROOT_BOOTSTRAP = $home/go1.4

View File

@ -21,6 +21,7 @@ export GOPATH
unset CDPATH # in case user has it set
unset GOBIN # Issue 14340
unset GOFLAGS
unset GO111MODULE
export GOHOSTOS
export CC

View File

@ -18,6 +18,7 @@ set GOPATH=
:: Issue 14340: ignore GOBIN during all.bat.
set GOBIN=
set GOFLAGS=
set GO111MODULE=
rem TODO avoid rebuild if possible

View File

@ -11,5 +11,6 @@ GOPATH = () # we disallow local import for non-local packages, if $GOROOT happen
# to be under $GOPATH, then some tests below will fail
GOBIN = () # Issue 14340
GOFLAGS = ()
GO111MODULE = ()
exec go tool dist test -rebuild $*