1
0
mirror of https://github.com/golang/go synced 2024-11-12 08:20:22 -07:00

cmd/go: do not print GCC environment variables on Plan 9

R=seed, rminnich, r, minux.ma
CC=golang-dev
https://golang.org/cl/7397059
This commit is contained in:
Anthony Martin 2013-02-26 08:34:47 -08:00
parent a5e42f2611
commit c14d255ac5

View File

@ -34,12 +34,10 @@ func mkEnv() []envVar {
b.init()
env := []envVar{
{"CC", b.gccCmd(".")[0]},
{"GOARCH", goarch},
{"GOBIN", gobin},
{"GOCHAR", archChar},
{"GOEXE", exeSuffix},
{"GOGCCFLAGS", strings.Join(b.gccCmd(".")[3:], " ")},
{"GOHOSTARCH", runtime.GOARCH},
{"GOHOSTOS", runtime.GOOS},
{"GOOS", goos},
@ -48,6 +46,12 @@ func mkEnv() []envVar {
{"GOTOOLDIR", toolDir},
}
if goos != "plan9" {
cmd := b.gccCmd(".")
env = append(env, envVar{"CC", cmd[0]})
env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")})
}
if buildContext.CgoEnabled {
env = append(env, envVar{"CGO_ENABLED", "1"})
} else {