Commit 4d7a5edb authored by Shenghou Ma's avatar Shenghou Ma Committed by Brad Fitzpatrick

cmd/link/internal/ld: always show output from external linker

Fixes #17935.

Change-Id: I49b0f6cee29ea76ed62b8faa5d6d1f51be41bf84
Reviewed-on: https://go-review.googlesource.com/33301
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent e41fb559
......@@ -1260,7 +1260,9 @@ func (l *Link) hostlink() {
if out, err := exec.Command(argv[0], argv[1:]...).CombinedOutput(); err != nil {
Exitf("running %s failed: %v\n%s", argv[0], err, out)
} else if l.Debugvlog != 0 && len(out) > 0 {
} else if len(out) > 0 {
// always print external output even if the command is successful, so that we don't
// swallow linker warnings (see https://golang.org/issue/17935).
l.Logf("%s", out)
}
......
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