Commit 226651a5 authored by Ian Lance Taylor's avatar Ian Lance Taylor Committed by Brad Fitzpatrick

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent f2239d39
...@@ -90,7 +90,7 @@ func vetFlags(args []string) (passToVet, packageNames []string) { ...@@ -90,7 +90,7 @@ func vetFlags(args []string) (passToVet, packageNames []string) {
} }
switch f.Name { switch f.Name {
// Flags known to the build but not to vet, so must be dropped. // Flags known to the build but not to vet, so must be dropped.
case "x", "n", "vettool": case "x", "n", "vettool", "compiler":
if extraWord { if extraWord {
args = append(args[:i], args[i+2:]...) args = append(args[:i], args[i+2:]...)
extraWord = false extraWord = false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment