Skip to content

Commit 7141d1e

Browse files
rscgopherbot
authored andcommitted
make.bash,bat,rc: use Go 1.20.6 instead of Go 1.17.13
This was missed in the update of the bootstrap toolchain and should help people who don't set GOROOT_BOOTSTRAP and instead assume these scripts will find the right one. For #54265. Change-Id: I37a0d0976006d13b73df00013780be5abf202e91 Reviewed-on: https://go-review.googlesource.com/c/go/+/512275 Run-TryBot: Russ Cox <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Auto-Submit: Russ Cox <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent b02725a commit 7141d1e

File tree

4 files changed

+14
-20
lines changed

4 files changed

+14
-20
lines changed

src/cmd/dist/README

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,18 @@ As of Go 1.5, dist and other parts of the compiler toolchain are written
44
in Go, making bootstrapping a little more involved than in the past.
55
The approach is to build the current release of Go with an earlier one.
66

7-
The process to install Go 1.x, for x ≥ 20, is:
7+
The process to install Go 1.x, for x ≥ 22, is:
88

9-
1. Build cmd/dist with Go 1.17.13.
10-
2. Using dist, build Go 1.x compiler toolchain with Go 1.17.13.
9+
1. Build cmd/dist with Go 1.20.6.
10+
2. Using dist, build Go 1.x compiler toolchain with Go 1.20.6.
1111
3. Using dist, rebuild Go 1.x compiler toolchain with itself.
1212
4. Using dist, build Go 1.x cmd/go (as go_bootstrap) with Go 1.x compiler toolchain.
1313
5. Using go_bootstrap, build the remaining Go 1.x standard library and commands.
1414

15-
NOTE: During the transition from the old C-based toolchain to the Go-based one,
16-
step 2 also builds the parts of the toolchain written in C, and step 3 does not
17-
recompile those.
15+
Because of backward compatibility, although the steps above say Go 1.20.6,
16+
in practice any release ≥ Go 1.20.6 but < Go 1.x will work as the bootstrap base.
17+
Releases ≥ Go 1.x are very likely to work as well.
1818

19-
Because of backward compatibility, although the steps above say Go 1.17.13,
20-
in practice any release ≥ Go 1.17.13 but < Go 1.x will work as the bootstrap base.
19+
See golang.org/s/go15bootstrap for more details about the original bootstrap
20+
and https://go.dev/cl/54265 for details about later bootstrap version bumps.
2121

22-
See golang.org/s/go15bootstrap for more details.
23-
24-
Compared to Go 1.4 and earlier, dist will also take over much of what used to
25-
be done by make.bash/make.bat/make.rc and all of what used to be done by
26-
run.bash/run.bat/run.rc, because it is nicer to implement that logic in Go
27-
than in three different scripting languages simultaneously.

src/make.bash

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@
6767
# timing information to this file. Useful for profiling where the
6868
# time goes when these scripts run.
6969
#
70-
# GOROOT_BOOTSTRAP: A working Go tree >= Go 1.17.13 for bootstrap.
70+
# GOROOT_BOOTSTRAP: A working Go tree >= Go 1.20.6 for bootstrap.
7171
# If $GOROOT_BOOTSTRAP/bin/go is missing, $(go env GOROOT) is
72-
# tried for all "go" in $PATH. By default, one of $HOME/go1.17.13,
73-
# $HOME/sdk/go1.17.13, or $HOME/go1.4, whichever exists, in that order.
72+
# tried for all "go" in $PATH. By default, one of $HOME/go1.20.6,
73+
# $HOME/sdk/go1.20.6, or $HOME/go1.4, whichever exists, in that order.
7474
# We still check $HOME/go1.4 to allow for build scripts that still hard-code
7575
# that name even though they put newer Go toolchains there.
7676

77-
bootgo=1.17.13
77+
bootgo=1.20.6
7878

7979
set -e
8080

src/make.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ for /f "tokens=*" %%g in ('where go 2^>nul') do (
8585
)
8686
)
8787

88-
set bootgo=1.17.13
88+
set bootgo=1.20.6
8989
if "x%GOROOT_BOOTSTRAP%"=="x" if exist "%HOMEDRIVE%%HOMEPATH%\go%bootgo%" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\go%bootgo%
9090
if "x%GOROOT_BOOTSTRAP%"=="x" if exist "%HOMEDRIVE%%HOMEPATH%\sdk\go%bootgo%" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\sdk\go%bootgo%
9191
if "x%GOROOT_BOOTSTRAP%"=="x" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\Go1.4

src/make.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn nogoenv {
5151
GO111MODULE=off GOENV=off GOOS=() GOARCH=() GOEXPERIMENT=() GOFLAGS=() $*
5252
}
5353
54-
bootgo = 1.17.13
54+
bootgo = 1.20.6
5555
GOROOT = `{cd .. && pwd}
5656
goroot_bootstrap_set = 'true'
5757
if(! ~ $#GOROOT_BOOTSTRAP 1){

0 commit comments

Comments
 (0)