cmd/go: don't clobber `go env GOGCCFLAGS`
When CC is set in the environment, the mkEnv function sets its version of CC to the first word $CC and sets GOGCCFLAGS to the remainder. That worked since Go 1 but was broken accidentally by https://golang.org/cl/6409, which changed the code such that `go env` calls mkEnv twice. The second call to mkEnv would clobber GOGCCFLAGS based on the value of CC set by the first call. Go back to the old handling by only calling mkEnv once. Fixes #15457. Change-Id: I000a1ebcc48684667e48f2b9b24605867b9e06cd Reviewed-on: https://go-review.googlesource.com/33293Reviewed-by: Russ Cox <rsc@golang.org>
Showing
Please register or sign in to comment