Skip to content

Commit 6abfe7b

Browse files
dmitshurgopherbot
authored andcommitted
cmd/dist: require Go 1.24.6 as minimum bootstrap toolchain
This is a minimal change to start to require the new minimum bootstrap. Taking advantage of the newer bootstrap to simplify and improve code is left to be done in separate CLs. For golang#69315. Change-Id: I4bef752b2adb67e969d585d97e680d26afefc6f4 Reviewed-on: https://go-review.googlesource.com/c/go/+/694535 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: David Chase <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 691af6c commit 6abfe7b

File tree

7 files changed

+25
-21
lines changed

7 files changed

+25
-21
lines changed

doc/next/5-toolchain.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@
44

55
## Linker {#linker}
66

7+
## Bootstrap {#bootstrap}
78

9+
<!-- go.dev/issue/69315 -->
10+
As mentioned in the [Go 1.24 release notes](/doc/go1.24#bootstrap), Go 1.26 now requires
11+
Go 1.24.6 or later for bootstrap.
12+
We expect that Go 1.28 will require a minor release of Go 1.26 or later for bootstrap.

src/cmd/dist/README

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@ 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 ≥ 24, is:
7+
The process to install Go 1.x, for x ≥ 26, is:
88

9-
1. Build cmd/dist with Go 1.22.6.
10-
2. Using dist, build Go 1.x compiler toolchain with Go 1.22.6.
9+
1. Build cmd/dist with Go 1.24.6.
10+
2. Using dist, build Go 1.x compiler toolchain with Go 1.24.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-
Because of backward compatibility, although the steps above say Go 1.22.6,
16-
in practice any release ≥ Go 1.22.6 but < Go 1.x will work as the bootstrap base.
15+
Because of backward compatibility, although the steps above say Go 1.24.6,
16+
in practice any release ≥ Go 1.24.6 but < Go 1.x will work as the bootstrap base.
1717
Releases ≥ Go 1.x are very likely to work as well.
1818

19-
See https://go.dev/s/go15bootstrap for more details about the original bootstrap
20-
and https://go.dev/issue/54265 for details about later bootstrap version bumps.
21-
19+
See go.dev/s/go15bootstrap for more details about the original bootstrap
20+
and go.dev/issue/54265 for details about later bootstrap version bumps.

src/cmd/dist/buildtool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ var ignoreSuffixes = []string{
121121
"~",
122122
}
123123

124-
const minBootstrap = "go1.22.6"
124+
const minBootstrap = "go1.24.6"
125125

126126
var tryDirs = []string{
127127
"sdk/" + minBootstrap,

src/cmd/dist/notgo122.go renamed to src/cmd/dist/notgo124.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// Go 1.24 and later requires Go 1.22.6 as the bootstrap toolchain.
5+
// Go 1.26 and later requires Go 1.24.6 as the minimum bootstrap toolchain.
66
// If cmd/dist is built using an earlier Go version, this file will be
77
// included in the build and cause an error like:
88
//
99
// % GOROOT_BOOTSTRAP=$HOME/sdk/go1.16 ./make.bash
1010
// Building Go cmd/dist using /Users/rsc/sdk/go1.16. (go1.16 darwin/amd64)
11-
// found packages main (build.go) and building_Go_requires_Go_1_22_6_or_later (notgo122.go) in /Users/rsc/go/src/cmd/dist
11+
// found packages main (build.go) and building_Go_requires_Go_1_24_6_or_later (notgo124.go) in /Users/rsc/go/src/cmd/dist
1212
// %
1313
//
1414
// which is the best we can do under the circumstances.
1515
//
16-
// See go.dev/issue/44505 for more background on
17-
// why Go moved on from Go 1.4 for bootstrap.
16+
// See go.dev/issue/44505 and go.dev/issue/54265 for more
17+
// background on why Go moved on from Go 1.4 for bootstrap.
1818

19-
//go:build !go1.22
19+
//go:build !go1.24
2020

21-
package building_Go_requires_Go_1_22_6_or_later
21+
package building_Go_requires_Go_1_24_6_or_later

src/make.bash

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

74-
bootgo=1.22.6
74+
bootgo=1.24.6
7575

7676
set -e
7777

src/make.bat

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

74-
set bootgo=1.22.6
74+
set bootgo=1.24.6
7575
if "x%GOROOT_BOOTSTRAP%"=="x" if exist "%HOMEDRIVE%%HOMEPATH%\go%bootgo%" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\go%bootgo%
7676
if "x%GOROOT_BOOTSTRAP%"=="x" if exist "%HOMEDRIVE%%HOMEPATH%\sdk\go%bootgo%" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\sdk\go%bootgo%
7777
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
@@ -48,7 +48,7 @@ fn bootstrapenv {
4848
GOROOT=$GOROOT_BOOTSTRAP GO111MODULE=off GOENV=off GOOS=() GOARCH=() GOEXPERIMENT=() GOFLAGS=() $*
4949
}
5050
51-
bootgo = 1.22.6
51+
bootgo = 1.24.6
5252
GOROOT = `{cd .. && pwd}
5353
goroot_bootstrap_set = 'true'
5454
if(~ $"GOROOT_BOOTSTRAP ''){

0 commit comments

Comments
 (0)