]> Cypherpunks repositories - gostls13.git/commit
cmd/go, cmd/compile: match tool versions
authorDavid Crawshaw <crawshaw@golang.org>
Thu, 4 May 2017 17:58:27 +0000 (13:58 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Thu, 4 May 2017 20:19:48 +0000 (20:19 +0000)
commit98b3e3a0649e749129380bf9117f20402701ec2d
tree93f067f45ef77b796ceb5fd4594f3314f97e44d7
parent9dd70591c5a05f0b507f2b56ed9660fdd7965420
cmd/go, cmd/compile: match tool versions

This change passes runtime.Version from the go tool to the compiler.
If the versions do not match, the compilation fails.
The result is a go tool from one GOROOT will complain loudly if it
is invoked with a different GOROOT value.

Only release versions are checked, so that when developing Go
you can still use "go install cmd/go" and "go install cmd/compile"
separately.

Fixes #19064

Change-Id: I17e184d07d3c1092b1d9af53ba55ed3ecf67791d
Reviewed-on: https://go-review.googlesource.com/42595
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/compile/internal/gc/main.go
src/cmd/go/go_test.go
src/cmd/go/internal/work/build.go
src/cmd/go/internal/work/testgo.go [new file with mode: 0644]