1
0
mirror of https://github.com/golang/go synced 2024-11-24 21:40:09 -07:00

[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 <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Russ Cox 2022-03-25 13:22:55 -04:00
parent d1405d7410
commit 9d6ab825f6

View File

@ -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)