Skip to content

Commit f081e2b

Browse files
cmd/go: let build -x output describe CGO_LDFLAGS env variable
Fixes #7249 LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://golang.org/cl/75820046
1 parent 666f5b4 commit f081e2b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/cmd/go/build.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,13 @@ func (b *builder) processOutput(out []byte) string {
13571357
func (b *builder) runOut(dir string, desc string, env []string, cmdargs ...interface{}) ([]byte, error) {
13581358
cmdline := stringList(cmdargs...)
13591359
if buildN || buildX {
1360-
b.showcmd(dir, "%s", joinUnambiguously(cmdline))
1360+
var envcmdline string
1361+
for i := range env {
1362+
envcmdline += env[i]
1363+
envcmdline += " "
1364+
}
1365+
envcmdline += joinUnambiguously(cmdline)
1366+
b.showcmd(dir, "%s", envcmdline)
13611367
if buildN {
13621368
return nil, nil
13631369
}

0 commit comments

Comments
 (0)