make.bat, make.rc: show bootstrap toolchain version

Print the bootstrap toolchain version on Plan 9 and Windows,
same as on all Unix systems since CL 204757 (Nov 2019).
This makes it easier to see what is going on in a build.

For #44505.

Change-Id: I50cdd5e15a7c8b908e33e92780f8a3bca65c91ef
Reviewed-on: https://go-review.googlesource.com/c/go/+/419452
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
Russ Cox 2022-07-26 14:21:03 -04:00
parent 87384801dc
commit f28fa952b5
2 changed files with 11 additions and 5 deletions

View File

@ -89,14 +89,16 @@ if not exist "%GOROOT_BOOTSTRAP%\bin\go.exe" goto bootstrapfail
set GOROOT=%GOROOT_TEMP%
set GOROOT_TEMP=
echo Building Go cmd/dist using %GOROOT_BOOTSTRAP%
if x%vflag==x-v echo cmd/dist
setlocal
set GOROOT=%GOROOT_BOOTSTRAP%
set GOOS=
set GOARCH=
set GOBIN=
set GOEXPERIMENT=
for /f "tokens=*" %%g IN ('%GOROOT_BOOTSTRAP%\bin\go version') do (set GOROOT_BOOTSTRAP_VERSION=%%g)
set GOROOT_BOOTSTRAP_VERSION=%GOROOT_BOOTSTRAP_VERSION:go version =%
echo Building Go cmd/dist using %GOROOT_BOOTSTRAP%. (%GOROOT_BOOTSTRAP_VERSION%)
if x%vflag==x-v echo cmd/dist
set GOROOT=%GOROOT_BOOTSTRAP%
set GOBIN=
set GO111MODULE=off
set GOENV=off
set GOFLAGS=

View File

@ -81,7 +81,11 @@ if(~ $GOROOT_BOOTSTRAP $GOROOT){
exit bootstrap
}
echo 'Building Go cmd/dist using '^$GOROOT_BOOTSTRAP
# 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='' GOEXPERIMENT='' $GOROOT_BOOTSTRAP/bin/go version | sed 's/go version //'}
echo 'Building Go cmd/dist using '$GOROOT_BOOTSTRAP'. ('$"GOROOT_BOOTSTRAP_VERSION')'
if(~ $#vflag 1)
echo cmd/dist
GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' GOEXPERIMENT='' GO111MODULE=off GOENV=off GOFLAGS='' $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist