diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2017-06-14 21:32:41 +0000 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2017-06-14 21:44:01 +0000 |
commit | 952ecbe0a27aadd184ca3e2c342beb464d6b1653 (patch) | |
tree | f11d095e0243656c494f404286617ddd999bf318 | |
parent | 8c4bec8fb7fb4f2ad1eb7ed027fac466244b0f4d (diff) | |
download | go-952ecbe0a27aadd184ca3e2c342beb464d6b1653.tar.gz go-952ecbe0a27aadd184ca3e2c342beb464d6b1653.zip |
cmd/go: disable tool version check during bootstrapgo1.9beta1
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 <cbro@golang.org>
-rw-r--r-- | src/cmd/go/internal/work/build.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go index 413537d9de..20f3952d4a 100644 --- a/src/cmd/go/internal/work/build.go +++ b/src/cmd/go/internal/work/build.go @@ -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) } } |