cmd/link: use ctxt.Logf instead of package log

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>
This commit is contained in:
Josh Bleecher Snyder 2021-02-24 11:48:09 -08:00
parent 3ee32439b5
commit 6c3f8a2f47

View file

@ -8,7 +8,6 @@ import (
"cmd/internal/objabi" "cmd/internal/objabi"
"cmd/internal/sys" "cmd/internal/sys"
"fmt" "fmt"
"log"
) )
// A BuildMode indicates the sort of object we are building. // 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 { if ctxt.Debugvlog > 1 {
defer func() { defer func() {
if res { if res {
log.Printf("external linking is forced by: %s\n", reason) ctxt.Logf("external linking is forced by: %s\n", reason)
} }
}() }()
} }