Skip to content

Commit 952ecbe

Browse files
committed
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/45778 Reviewed-by: Chris Broadfoot <[email protected]>
1 parent 8c4bec8 commit 952ecbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/go/internal/work/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ func BuildModeInit() {
396396
cfg.BuildContext.InstallSuffix += codegenArg[1:]
397397
}
398398
}
399-
if strings.HasPrefix(runtimeVersion, "go1") {
399+
if strings.HasPrefix(runtimeVersion, "go1") && !strings.Contains(os.Args[0], "go_bootstrap") {
400400
buildGcflags = append(buildGcflags, "-goversion", runtimeVersion)
401401
}
402402
}

0 commit comments

Comments
 (0)