]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: print CC environment variables on Plan 9
authorDavid du Colombier <0intro@gmail.com>
Tue, 22 Nov 2016 15:19:25 +0000 (16:19 +0100)
committerDavid du Colombier <0intro@gmail.com>
Tue, 22 Nov 2016 21:01:08 +0000 (21:01 +0000)
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/33396
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/go/env.go

index 7de72ef28970215290aa4dcd6219f4b30c643736..31710b7e6d62fbf36da4931daec635e6fef434ca 100644 (file)
@@ -62,13 +62,11 @@ func mkEnv() []envVar {
                env = append(env, envVar{"GO386", os.Getenv("GO386")})
        }
 
-       if goos != "plan9" {
-               cmd := b.gccCmd(".")
-               env = append(env, envVar{"CC", cmd[0]})
-               env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")})
-               cmd = b.gxxCmd(".")
-               env = append(env, envVar{"CXX", cmd[0]})
-       }
+       cmd := b.gccCmd(".")
+       env = append(env, envVar{"CC", cmd[0]})
+       env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")})
+       cmd = b.gxxCmd(".")
+       env = append(env, envVar{"CXX", cmd[0]})
 
        if buildContext.CgoEnabled {
                env = append(env, envVar{"CGO_ENABLED", "1"})