]> Cypherpunks repositories - gostls13.git/commit
cmd/go: pass go language version to cmd/compile
authorIan Lance Taylor <iant@golang.org>
Fri, 2 Nov 2018 23:00:33 +0000 (16:00 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 8 Nov 2018 01:55:42 +0000 (01:55 +0000)
commit40f585b21b7547031823d26fa6635500b2cff8da
treeb3a06659434c5ccd25186db8d4fa54ae6f6f9f24
parent60cf9ac7369ee4e7b12f3272132378cfc78b811d
cmd/go: pass go language version to cmd/compile

Pass the Go language version specified in the go.mod file to
cmd/compile.

Also, change the behavior when the go.mod file requests a Go version
that is later than the current one. Previously cmd/go would give a
fatal error in this situation. With this change it attempts the
compilation, and if (and only if) the compilation fails it adds a note
saying that the requested Go version is newer than the known version.
This is as described in https://golang.org/issue/28221.

Updates #28221.

Change-Id: I46803813e7872d4a418a3fd5299880be3b73a971
Reviewed-on: https://go-review.googlesource.com/c/147278
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/work/exec.go
src/cmd/go/internal/work/gc.go
src/cmd/go/testdata/script/mod_go_version.txt