]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: revert mod=vendor change accidentally included in CL 164623
authorBryan C. Mills <bcmills@google.com>
Tue, 12 Mar 2019 03:23:08 +0000 (23:23 -0400)
committerBryan C. Mills <bcmills@google.com>
Tue, 12 Mar 2019 14:57:47 +0000 (14:57 +0000)
I thought I had removed all of the 'mod=vendor' hacks I had inserted
previously, but apparently missed this one in a bad merge or rebase.

Updates #30228

Change-Id: Ia5aea754bf986458373fefd08fa9dd3941e31e43
Reviewed-on: https://go-review.googlesource.com/c/go/+/167077
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/dist/build.go

index c31d36acaed9e20c0912a805526f3b4bd6f83015..87739a510da60f833b93cbf86ec761db1f708bd4 100644 (file)
@@ -192,21 +192,6 @@ func xinit() {
 
        gogcflags = os.Getenv("BOOT_GO_GCFLAGS")
 
-       // Add -mod=vendor to GOFLAGS so that commands won't try to resolve go.mod
-       // files for vendored external modules.
-       // TODO(golang.org/issue/30240): If the vendor directory contains the go.mod
-       // files, this probably won't be necessary.
-       // TODO(golang.org/issue/26849): Escape spaces in GOFLAGS if needed.
-       goflags := strings.Fields(os.Getenv("GOFLAGS"))
-       for i, flag := range goflags {
-               if strings.HasPrefix(flag, "-mod=") {
-                       goflags = append(goflags[0:i], goflags[i+1:]...)
-                       break
-               }
-       }
-       goflags = append(goflags, "-mod=vendor")
-       os.Setenv("GOFLAGS", strings.Join(goflags, " "))
-
        cc, cxx := "gcc", "g++"
        if defaultclang {
                cc, cxx = "clang", "clang++"