]> Cypherpunks repositories - gostls13.git/commitdiff
make.bash: disable GOEXPERIMENT when using bootstrap toolchain
authorRuss Cox <rsc@golang.org>
Fri, 25 Mar 2022 17:22:55 +0000 (13:22 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 4 Apr 2022 21:06:39 +0000 (21:06 +0000)
When using Go 1.4 this doesn't matter, but when using Go 1.17,
the bootstrap toolchain will complain about unknown GOEXPERIMENT settings.
Clearly GOEXPERIMENT is for the toolchain being built, not the bootstrap.

Already submitted as CL 395879 on the dev.boringcrypto branch,
but needed on master to set up GOEXPERIMENT=boringcrypto
builder ahead of merge.

For #51940.

Change-Id: Ib6a4099cca799b4d5df1974cdb5471adb0fd557d
Reviewed-on: https://go-review.googlesource.com/c/go/+/397894
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/make.bash
src/make.bat
src/make.rc

index 31387da33cfaab50ba081b719a66b369bdbf8a95..e517a1bda91dc2a416d87b4d3709e646ddcbfb7c 100755 (executable)
@@ -193,7 +193,7 @@ fi
 # Get the exact bootstrap toolchain version to help with debugging.
 # We clear GOOS and GOARCH to avoid an ominous but harmless warning if
 # the bootstrap doesn't support them.
-GOROOT_BOOTSTRAP_VERSION=$(GOOS= GOARCH= $GOROOT_BOOTSTRAP/bin/go version | sed 's/go version //')
+GOROOT_BOOTSTRAP_VERSION=$(GOOS= GOARCH= GOEXPERIMENT= $GOROOT_BOOTSTRAP/bin/go version | sed 's/go version //')
 echo "Building Go cmd/dist using $GOROOT_BOOTSTRAP. ($GOROOT_BOOTSTRAP_VERSION)"
 if $verbose; then
        echo cmd/dist
@@ -204,7 +204,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
        exit 1
 fi
 rm -f cmd/dist/dist
-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
+GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off GOEXPERIMENT="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
 
 # -e doesn't propagate out of eval, so check success by hand.
 eval $(./cmd/dist/dist env -p || echo FAIL=true)
index 56da417dd1c47195b2d5de685c2230bb2dca1e7c..c2f87ace7593ff25ac30df1c6add84fdae881f2e 100644 (file)
@@ -100,6 +100,7 @@ set GOROOT=%GOROOT_BOOTSTRAP%
 set GOOS=\r
 set GOARCH=\r
 set GOBIN=\r
+set GOEXPERIMENT=\r
 set GO111MODULE=off\r
 "%GOROOT_BOOTSTRAP%\bin\go.exe" build -o cmd\dist\dist.exe .\cmd\dist\r
 endlocal\r
index 066c3ab323be0b7cd3964979e46c54105a50cdbd..273d1511907a428936be0a5657b64f65ad1128c5 100755 (executable)
@@ -88,7 +88,7 @@ if(~ $GOROOT_BOOTSTRAP $GOROOT){
 echo 'Building Go cmd/dist using '^$GOROOT_BOOTSTRAP
 if(~ $#vflag 1)
        echo cmd/dist
-GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' GO111MODULE=off $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist
+GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' GOEXPERIMENT='' GO111MODULE=off $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist
 
 eval `{./cmd/dist/dist env -9}
 if(~ $#vflag 1)