]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: use -installsuffix to determine the includes directory list
authorDave Day <djd@golang.org>
Wed, 2 Oct 2013 00:44:57 +0000 (20:44 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 2 Oct 2013 00:44:57 +0000 (20:44 -0400)
Currently, the directories generaed by includeArgs can have the "_race"
suffix added if invoked with -race flag, but ignores -installsuffix if
set.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/14174043

src/cmd/go/build.go

index e614f2f5385fa55a4687e080506e17612bc9f087..b7edd49ce021b1d4511a7a99c95f0cb96194a00d 100644 (file)
@@ -1052,8 +1052,8 @@ func (b *builder) includeArgs(flag string, all []*action) []string {
                                dir = filepath.Join(dir, "gccgo_"+goos+"_"+goarch)
                        } else {
                                dir = filepath.Join(dir, goos+"_"+goarch)
-                               if buildRace {
-                                       dir += "_race"
+                               if buildContext.InstallSuffix != "" {
+                                       dir += "_" + buildContext.InstallSuffix
                                }
                        }
                        inc = append(inc, flag, dir)