]> Cypherpunks.ru repositories - gostls13.git/commitdiff
Revert "build: for default bootstrap, use Go 1.17 if present, falling back to Go...
authorMichael Pratt <mpratt@google.com>
Tue, 7 Dec 2021 22:51:46 +0000 (22:51 +0000)
committerRuss Cox <rsc@golang.org>
Wed, 8 Dec 2021 01:17:33 +0000 (01:17 +0000)
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 <dmitshur@golang.org>
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/dist/buildtool.go
src/make.bash
src/make.bat
src/make.rc

index 17538ad5a43e22cfb39ffab3dc6782a1350e3a19..75f04a975c92d492ef46591d10bef65ba2520b53 100644 (file)
@@ -93,21 +93,10 @@ var ignoreSuffixes = []string{
        "_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)
 
index 2d6c47272e73d74867bd2b49d467e7e5577db0a4..3310692a18c4a542d0601e887937b9adf34c5cc0 100755 (executable)
@@ -153,14 +153,7 @@ if [ "$1" = "-v" ]; then
 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
index 6bffee050eec548aed83c86659297d534fcef34b..8f2825b09a935fe36cc6cb67baa230eeed9e5977 100644 (file)
@@ -83,8 +83,6 @@ for /f "tokens=*" %%g in ('where go 2^>nul') do (
                )\r
        )\r
 )\r
-if "x%GOROOT_BOOTSTRAP%"=="x" if exist "%HOMEDRIVE%%HOMEPATH%\go1.17" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\go1.17\r
-if "x%GOROOT_BOOTSTRAP%"=="x" if exist "%HOMEDRIVE%%HOMEPATH%\sdk\go1.17" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\sdk\go1.17\r
 if "x%GOROOT_BOOTSTRAP%"=="x" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\Go1.4\r
 \r
 :bootstrapset\r
index 37087d6357c8b868e89e7163906ec0563636bba9..ba8c5db2d9fe7c375ae8ed58d3ae67fde2e00ddc 100755 (executable)
@@ -55,9 +55,6 @@ goroot_bootstrap_set = 'true'
 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){