]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link/internal/ld: always show output from external linker
authorShenghou Ma <minux@golang.org>
Wed, 16 Nov 2016 06:05:34 +0000 (01:05 -0500)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 3 May 2017 15:01:06 +0000 (15:01 +0000)
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: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/link/internal/ld/lib.go

index 0f3b46d972f273268ede132a23cdb8974f90d2e2..b69e3a6018297846c6a1e2769ac7a2ff127a0d7e 100644 (file)
@@ -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)
        }