Commit 46323795 authored by David du Colombier's avatar David du Colombier

cmd/go: print CC environment variables on Plan 9

This changes makes the output of `go env` the same
as on other operating systems.

Fixes #18013.

Change-Id: I3079e14dcf7b30c75ec3fde6c78cb95721111320
Reviewed-on: https://go-review.googlesource.com/33396Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 55085611
...@@ -62,13 +62,11 @@ func mkEnv() []envVar { ...@@ -62,13 +62,11 @@ func mkEnv() []envVar {
env = append(env, envVar{"GO386", os.Getenv("GO386")}) env = append(env, envVar{"GO386", os.Getenv("GO386")})
} }
if goos != "plan9" { cmd := b.gccCmd(".")
cmd := b.gccCmd(".") env = append(env, envVar{"CC", cmd[0]})
env = append(env, envVar{"CC", cmd[0]}) env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")})
env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")}) cmd = b.gxxCmd(".")
cmd = b.gxxCmd(".") env = append(env, envVar{"CXX", cmd[0]})
env = append(env, envVar{"CXX", cmd[0]})
}
if buildContext.CgoEnabled { if buildContext.CgoEnabled {
env = append(env, envVar{"CGO_ENABLED", "1"}) env = append(env, envVar{"CGO_ENABLED", "1"})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment