]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: handle -ccflags in 'go test'
authorShenghou Ma <minux.ma@gmail.com>
Mon, 21 Apr 2014 04:02:21 +0000 (00:02 -0400)
committerShenghou Ma <minux.ma@gmail.com>
Mon, 21 Apr 2014 04:02:21 +0000 (00:02 -0400)
CL 89050043 only allows -ccflags for 'go test', this
CL really handles the flag like the other -??flags.
Many thanks to Dobrosław Żybort for pointing this out.
Fixes #7810 (again).

LGTM=iant, matrixik
R=golang-codereviews, iant, matrixik
CC=golang-codereviews
https://golang.org/cl/89230044

src/cmd/go/testflag.go

index adfc2d9216be61a239c35534dc007ffeaa837c23..8c45e5c1b259064622f49a5a6fd44fd377ce423b 100644 (file)
@@ -160,6 +160,11 @@ func testFlags(args []string) (packageNames, passToTest []string) {
                        if err != nil {
                                fatalf("invalid flag argument for -%s: %v", f.name, err)
                        }
+               case "ccflags":
+                       buildCcflags, err = splitQuotedFields(value)
+                       if err != nil {
+                               fatalf("invalid flag argument for -%s: %v", f.name, err)
+                       }
                case "gcflags":
                        buildGcflags, err = splitQuotedFields(value)
                        if err != nil {