mirror of https://github.com/golang/go.git
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 <dmitshur@golang.org> Trust: Michael Pratt <mpratt@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
0a15e7851a
commit
34573aeb97
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -83,8 +83,6 @@ for /f "tokens=*" %%g in ('where go 2^>nul') do (
|
|||
)
|
||||
)
|
||||
)
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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){
|
||||
|
|
|
|||
Loading…
Reference in New Issue