Commit 952ecbe0 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

cmd/go: disable tool version check during bootstrap

The check that the go tool version matched the go compiler version was
too aggressive and didn't cover the bootstrapping case with make.bash.

We never noticed because we never had a VERSION file in place.

Repro:

$ echo "go1.9beta1" > $GOROOT/VERSION
$ cd $GOROOT/src
$ ./make.bash

No test, because x/build/cmd/release catches it.

Updates #19064
Fixes #20674

Change-Id: Ibdd7a92377f4cc77d71ed548f02d48bde6550f67
Reviewed-on: https://go-review.googlesource.com/45778Reviewed-by: default avatarChris Broadfoot <cbro@golang.org>
parent 8c4bec8f
......@@ -396,7 +396,7 @@ func BuildModeInit() {
cfg.BuildContext.InstallSuffix += codegenArg[1:]
}
}
if strings.HasPrefix(runtimeVersion, "go1") {
if strings.HasPrefix(runtimeVersion, "go1") && !strings.Contains(os.Args[0], "go_bootstrap") {
buildGcflags = append(buildGcflags, "-goversion", runtimeVersion)
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment