[go] Revert "build: for default bootstrap, use Go 1.17 if present, falling back to Go 1.4"

2 views
Skip to first unread message

Russ Cox (Gerrit)

unread,
Dec 7, 2021, 8:17:37 PM12/7/21
to Michael Pratt, Russ Cox, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Gopher Robot, Dmitri Shuralyov, Cuong Manh Le, Ian Lance Taylor, David Chase, golang-co...@googlegroups.com

Russ Cox submitted this change.

View Change



1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Approvals: Dmitri Shuralyov: Looks good to me, approved Michael Pratt: Trusted; Run TryBots Gopher Robot: TryBots succeeded
Revert "build: for default bootstrap, use Go 1.17 if present, falling back to Go 1.4"

This reverts https://golang.org/cl/369914.

Reason for revert: Breaking previously working toolchain builds.

For #44505.

Change-Id: I09ae20e50109a600d036358118077d27669df39c
Reviewed-on: https://go-review.googlesource.com/c/go/+/370138
Reviewed-by: Dmitri Shuralyov <dmit...@golang.org>
Trust: Michael Pratt <mpr...@google.com>
Run-TryBot: Michael Pratt <mpr...@google.com>
TryBot-Result: Gopher Robot <go...@golang.org>
---
M src/cmd/dist/buildtool.go
M src/make.bash
M src/make.bat
M src/make.rc
4 files changed, 22 insertions(+), 25 deletions(-)

diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go
index 17538ad..75f04a9 100644
--- a/src/cmd/dist/buildtool.go
+++ b/src/cmd/dist/buildtool.go
@@ -93,21 +93,10 @@
"_test.go",
}

-var tryDirs = []string{
- "sdk/go1.17",
- "go1.17",
-}
-
func bootstrapBuildTools() {
goroot_bootstrap := os.Getenv("GOROOT_BOOTSTRAP")
if goroot_bootstrap == "" {
- home := os.Getenv("HOME")
- goroot_bootstrap = pathf("%s/go1.4", home)
- for _, d := range tryDirs {
- if p := pathf("%s/%s", home, d); isdir(p) {
- goroot_bootstrap = p
- }
- }
+ goroot_bootstrap = pathf("%s/go1.4", os.Getenv("HOME"))
}
xprintf("Building Go toolchain1 using %s.\n", goroot_bootstrap)

diff --git a/src/make.bash b/src/make.bash
index 2d6c472..3310692 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -153,14 +153,7 @@
fi

goroot_bootstrap_set=${GOROOT_BOOTSTRAP+"true"}
-if [ -z "$GOROOT_BOOTSTRAP" ]; then
- GOROOT_BOOTSTRAP="$HOME/go1.4"
- for d in sdk/go1.17 go1.17; do
- if [ -d "$HOME/$d" ]; then
- GOROOT_BOOTSTRAP="$HOME/$d"
- fi
- done
-fi
+export GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:-$HOME/go1.4}
export GOROOT="$(cd .. && pwd)"
IFS=$'\n'; for go_exe in $(type -ap go); do
if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then
diff --git a/src/make.bat b/src/make.bat
index 6bffee0..8f2825b 100644
--- a/src/make.bat
+++ b/src/make.bat
@@ -83,8 +83,6 @@
)
)
)
-if "x%GOROOT_BOOTSTRAP%"=="x" if exist "%HOMEDRIVE%%HOMEPATH%\go1.17" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\go1.17
-if "x%GOROOT_BOOTSTRAP%"=="x" if exist "%HOMEDRIVE%%HOMEPATH%\sdk\go1.17" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\sdk\go1.17
if "x%GOROOT_BOOTSTRAP%"=="x" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\Go1.4

:bootstrapset
diff --git a/src/make.rc b/src/make.rc
index 37087d6..ba8c5db 100755
--- a/src/make.rc
+++ b/src/make.rc
@@ -55,9 +55,6 @@
if(! ~ $#GOROOT_BOOTSTRAP 1){
goroot_bootstrap_set = 'false'
GOROOT_BOOTSTRAP = $home/go1.4
- for(d in sdk/go1.17 go1.17)
- if(test -d $home/$d)
- GOROOT_BOOTSTRAP = $home/$d
}
for(p in $path){
if(! test -x $GOROOT_BOOTSTRAP/bin/go){

To view, visit change 370138. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I09ae20e50109a600d036358118077d27669df39c
Gerrit-Change-Number: 370138
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Pratt <mpr...@google.com>
Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-Reviewer: Russ Cox <r...@golang.org>
Gerrit-CC: David Chase <drc...@google.com>
Gerrit-MessageType: merged
Reply all
Reply to author
Forward
0 new messages