Skip to content

Commit

Permalink
cmd/go: do not print GCC environment variables on Plan 9
Browse files Browse the repository at this point in the history
R=seed, rminnich, r, minux.ma
CC=golang-dev
https://golang.org/cl/7397059
  • Loading branch information
ality committed Feb 26, 2013
1 parent a5e42f2 commit c14d255
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cmd/go/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand All @@ -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 {
Expand Down

0 comments on commit c14d255

Please sign in to comment.