From 9d6ab825f6fe125f7ce630e103b887e580403802 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 25 Mar 2022 13:22:55 -0400 Subject: [PATCH] [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 --- src/make.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/make.bash b/src/make.bash index 96cbbf37a91..d8c1da6766e 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)