From 226651a541286726df30ff067d519f4efd57cec7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 17 May 2018 23:21:29 -0400 Subject: [PATCH] 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 Reviewed-by: Brad Fitzpatrick --- src/cmd/go/internal/vet/vetflag.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/go/internal/vet/vetflag.go b/src/cmd/go/internal/vet/vetflag.go index d4664cc7e9..03770ea920 100644 --- a/src/cmd/go/internal/vet/vetflag.go +++ b/src/cmd/go/internal/vet/vetflag.go @@ -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