1
0
mirror of https://github.com/golang/go synced 2024-11-18 10:54:40 -07:00

cmd/go: don't pass -compiler flag to vet

Without this running go vet -compiler=gccgo causes vet to fail.
The vet tool does need to know the compiler, but it is passed in
vetConfig.Compiler.

Change-Id: If857be4f336f6d7c425972fabcf82fae2cdc8a90
Reviewed-on: https://go-review.googlesource.com/113715
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Ian Lance Taylor 2018-05-17 23:21:29 -04:00 committed by Brad Fitzpatrick
parent f2239d3957
commit 226651a541

View File

@ -90,7 +90,7 @@ func vetFlags(args []string) (passToVet, packageNames []string) {
}
switch f.Name {
// Flags known to the build but not to vet, so must be dropped.
case "x", "n", "vettool":
case "x", "n", "vettool", "compiler":
if extraWord {
args = append(args[:i], args[i+2:]...)
extraWord = false