From: Russ Cox Date: Fri, 25 Mar 2022 17:22:55 +0000 (-0400) Subject: [dev.boringcrypto] make.bash: disable GOEXPERIMENT when using bootstrap toolchain X-Git-Tag: go1.19beta1~484^2~19 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9d6ab825f6fe125f7ce630e103b887e580403802;p=gostls13.git [dev.boringcrypto] make.bash: disable GOEXPERIMENT when using bootstrap toolchain 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. For #51940. Change-Id: Iff77204391a5a66f7eecab1c7036ebe77e1a4e82 Reviewed-on: https://go-review.googlesource.com/c/go/+/395879 Trust: Russ Cox Run-TryBot: Russ Cox Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot --- diff --git a/src/make.bash b/src/make.bash index 96cbbf37a9..d8c1da6766 100755 --- a/src/make.bash +++ b/src/make.bash @@ -185,7 +185,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 @@ -196,7 +196,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)