]> Cypherpunks repositories - gostls13.git/commit
cmd/go, cmd/cgo: only set TERM=dumb when running the compiler
authorIan Lance Taylor <iant@golang.org>
Tue, 10 Jul 2018 14:19:17 +0000 (07:19 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 10 Jul 2018 16:34:16 +0000 (16:34 +0000)
commitfa71076d242d0f9da48080dd9ddfd9c0f8a469cb
tree843815188bca7546e05564f1e969ddc05aa13a16
parentf9800a94730eb6ead87017e6f829f58c4459870b
cmd/go, cmd/cgo: only set TERM=dumb when running the compiler

The clang compiler on some terminals will issue colored error
messages, which can confuse tools like cgo. To avoid this we used to
set TERM=dumb for all programs started by the go tool. However, that
confuses the pprof tool, which doesn't know whether to support fancy
editing and colors itself.

Instead, change the go tool and the cgo tool to set TERM=dumb where it
matters--when invoking the C compiler--rather than in all cases.

Updates #26254

Change-Id: I95174f961ac269a50a83f5f9d268219043cba968
Reviewed-on: https://go-review.googlesource.com/122975
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/cgo/util.go
src/cmd/go/internal/envcmd/env.go
src/cmd/go/internal/work/exec.go