]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: use ctxt.Logf instead of package log
authorJosh Bleecher Snyder <josharian@gmail.com>
Wed, 24 Feb 2021 19:48:09 +0000 (11:48 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Wed, 24 Feb 2021 20:23:56 +0000 (20:23 +0000)
Fixes #43601

Change-Id: I28b745cb92932d875a66f64c63355650a092f096
Reviewed-on: https://go-review.googlesource.com/c/go/+/296029
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

src/cmd/link/internal/ld/config.go

index 481dc6747501db2aedf38689a97932913ea9d14d..291b28e11c21a64c5331782c8051e9b999d346c6 100644 (file)
@@ -8,7 +8,6 @@ import (
        "cmd/internal/objabi"
        "cmd/internal/sys"
        "fmt"
-       "log"
 )
 
 // A BuildMode indicates the sort of object we are building.
@@ -181,7 +180,7 @@ func mustLinkExternal(ctxt *Link) (res bool, reason string) {
        if ctxt.Debugvlog > 1 {
                defer func() {
                        if res {
-                               log.Printf("external linking is forced by: %s\n", reason)
+                               ctxt.Logf("external linking is forced by: %s\n", reason)
                        }
                }()
        }