aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/envcmd/env.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2017-07-18 11:57:05 -0400
committerRuss Cox <rsc@golang.org>2017-09-30 00:55:58 +0000
commita1fb024ac923bba8350ead22188fbcf0cca985a7 (patch)
tree523e031454639fb5daa95967dc6881044d006d18 /src/cmd/go/internal/envcmd/env.go
parent1409c28707264cd9e30082920da772b841f2bc9e (diff)
downloadgo-a1fb024ac923bba8350ead22188fbcf0cca985a7.tar.gz
go-a1fb024ac923bba8350ead22188fbcf0cca985a7.zip
cmd/go: hide work subdirectory names in gcc/clang object files
Until now the subdirectories under $WORK have had predictable names, so it was OK to strip just $WORK from the file names that end up in object files. In the future, those predictable names would cause predictable collisions when compiling one package in two different ways, so we're moving toward arbitrary, unpredictable subdirectory names instead. When we do that, if the names appear in the object files we won't get reproducible builds. Take the subdirectory names out now, to make the later change safe. Change-Id: I8057d1cc73f6e35c98b7718c9789c161dcbd87c0 Reviewed-on: https://go-review.googlesource.com/67251 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/go/internal/envcmd/env.go')
-rw-r--r--src/cmd/go/internal/envcmd/env.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
index 43d4334f06..c62a41901e 100644
--- a/src/cmd/go/internal/envcmd/env.go
+++ b/src/cmd/go/internal/envcmd/env.go
@@ -73,10 +73,10 @@ func MkEnv() []cfg.EnvVar {
env = append(env, cfg.EnvVar{Name: "GO386", Value: cfg.GO386})
}
- cmd := b.GccCmd(".")
+ cmd := b.GccCmd(".", "")
env = append(env, cfg.EnvVar{Name: "CC", Value: cmd[0]})
env = append(env, cfg.EnvVar{Name: "GOGCCFLAGS", Value: strings.Join(cmd[3:], " ")})
- cmd = b.GxxCmd(".")
+ cmd = b.GxxCmd(".", "")
env = append(env, cfg.EnvVar{Name: "CXX", Value: cmd[0]})
if cfg.BuildContext.CgoEnabled {