aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2018-11-16 12:47:33 -0500
committerBrad Fitzpatrick <bradfitz@golang.org>2018-11-16 18:54:22 +0000
commit2a07c50a5cbf548a313eed6e691be78a0bac8b3e (patch)
treecc402e92e801f2adc0bf6cbe05c5361cc54ccfe7
parent55e1fc930b3a4efe4ac8ad74ff7844be4c7ef162 (diff)
downloadgo-2a07c50a5cbf548a313eed6e691be78a0bac8b3e.tar.gz
go-2a07c50a5cbf548a313eed6e691be78a0bac8b3e.zip
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>
-rwxr-xr-xsrc/make.bash1
-rw-r--r--src/make.bat1
-rwxr-xr-xsrc/make.rc1
-rwxr-xr-xsrc/run.bash1
-rw-r--r--src/run.bat1
-rwxr-xr-xsrc/run.rc1
6 files changed, 6 insertions, 0 deletions
diff --git a/src/make.bash b/src/make.bash
index 78882d9834..13497eb039 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -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
diff --git a/src/make.bat b/src/make.bat
index 9ca7afb5aa..69275e2256 100644
--- a/src/make.bat
+++ b/src/make.bat
@@ -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.
diff --git a/src/make.rc b/src/make.rc
index a97dfc8a01..5f888c19fd 100755
--- a/src/make.rc
+++ b/src/make.rc
@@ -48,6 +48,7 @@ if(~ $1 -v) {
}
GOFLAGS=()
+GO111MODULE=()
GOROOT = `{cd .. && pwd}
if(! ~ $#GOROOT_BOOTSTRAP 1)
GOROOT_BOOTSTRAP = $home/go1.4
diff --git a/src/run.bash b/src/run.bash
index c14f4a206d..1c6c424434 100755
--- a/src/run.bash
+++ b/src/run.bash
@@ -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
diff --git a/src/run.bat b/src/run.bat
index 0e0c413617..123edcc35d 100644
--- a/src/run.bat
+++ b/src/run.bat
@@ -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
diff --git a/src/run.rc b/src/run.rc
index 49d6fd9a4d..c346f5cf5c 100755
--- a/src/run.rc
+++ b/src/run.rc
@@ -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 $*