Skip to content

Commit ef55053

Browse files
committed
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. 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 <[email protected]> Run-TryBot: Russ Cox <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 11ec59a commit ef55053

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/make.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ fi
193193
# Get the exact bootstrap toolchain version to help with debugging.
194194
# We clear GOOS and GOARCH to avoid an ominous but harmless warning if
195195
# the bootstrap doesn't support them.
196-
GOROOT_BOOTSTRAP_VERSION=$(GOOS= GOARCH= $GOROOT_BOOTSTRAP/bin/go version | sed 's/go version //')
196+
GOROOT_BOOTSTRAP_VERSION=$(GOOS= GOARCH= GOEXPERIMENT= $GOROOT_BOOTSTRAP/bin/go version | sed 's/go version //')
197197
echo "Building Go cmd/dist using $GOROOT_BOOTSTRAP. ($GOROOT_BOOTSTRAP_VERSION)"
198198
if $verbose; then
199199
echo cmd/dist
@@ -204,7 +204,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
204204
exit 1
205205
fi
206206
rm -f cmd/dist/dist
207-
GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
207+
GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off GOEXPERIMENT="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
208208

209209
# -e doesn't propagate out of eval, so check success by hand.
210210
eval $(./cmd/dist/dist env -p || echo FAIL=true)

src/make.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ set GOROOT=%GOROOT_BOOTSTRAP%
100100
set GOOS=
101101
set GOARCH=
102102
set GOBIN=
103+
set GOEXPERIMENT=
103104
set GO111MODULE=off
104105
"%GOROOT_BOOTSTRAP%\bin\go.exe" build -o cmd\dist\dist.exe .\cmd\dist
105106
endlocal

src/make.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ if(~ $GOROOT_BOOTSTRAP $GOROOT){
8888
echo 'Building Go cmd/dist using '^$GOROOT_BOOTSTRAP
8989
if(~ $#vflag 1)
9090
echo cmd/dist
91-
GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' GO111MODULE=off $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist
91+
GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' GOEXPERIMENT='' GO111MODULE=off $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist
9292

9393
eval `{./cmd/dist/dist env -9}
9494
if(~ $#vflag 1)

0 commit comments

Comments
 (0)