Skip to content

Commit

Permalink
cmd/link/internal/ld: always show output from external linker
Browse files Browse the repository at this point in the history
Fixes #17935.

Change-Id: I49b0f6cee29ea76ed62b8faa5d6d1f51be41bf84
Reviewed-on: https://go-review.googlesource.com/33301
Run-TryBot: Brad Fitzpatrick <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
minux authored and bradfitz committed May 3, 2017
1 parent e41fb55 commit 4d7a5ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cmd/link/internal/ld/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 4d7a5ed

Please sign in to comment.