aboutsummaryrefslogtreecommitdiff
path: root/src/make.rc
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2022-04-05 14:25:34 -0400
committerBryan Mills <bcmills@google.com>2022-04-05 21:45:19 +0000
commit69756b38f25bf72f1040dd7fd243febba89017e6 (patch)
tree54fc0ed6abf02e62db9266961cf5c2f855e98a44 /src/make.rc
parent5a6a830c1ceafd551937876f11590fd60aea1799 (diff)
downloadgo-69756b38f25bf72f1040dd7fd243febba89017e6.tar.gz
go-69756b38f25bf72f1040dd7fd243febba89017e6.zip
cmd/dist: move more environment logic into cmd/dist from make and run scripts
'go tool dist env' outputs different (and fewer) environment variables than 'go env'. The 'go tool dist env' variables should be authoritative, whereas many printed by 'go env' are merely informational (and not intended to be overridden in the actual environment). Fixes #52009 Change-Id: Ic0590153875183135cebf7ca55ead7c2b4038569 Reviewed-on: https://go-review.googlesource.com/c/go/+/398061 Trust: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/make.rc')
-rwxr-xr-xsrc/make.rc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/make.rc b/src/make.rc
index 273d151190..4597403a04 100755
--- a/src/make.rc
+++ b/src/make.rc
@@ -47,10 +47,6 @@ if(~ $1 -v) {
shift
}
-GOENV=off
-GOWORK=off
-GOFLAGS=()
-GO111MODULE=()
GOROOT = `{cd .. && pwd}
goroot_bootstrap_set = 'true'
if(! ~ $#GOROOT_BOOTSTRAP 1){
@@ -88,7 +84,7 @@ if(~ $GOROOT_BOOTSTRAP $GOROOT){
echo 'Building Go cmd/dist using '^$GOROOT_BOOTSTRAP
if(~ $#vflag 1)
echo cmd/dist
-GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' GOEXPERIMENT='' GO111MODULE=off $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist
+GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' GOEXPERIMENT='' GO111MODULE=off GOENV=off GOFLAGS='' $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist
eval `{./cmd/dist/dist env -9}
if(~ $#vflag 1)