From 6c3f8a2f4730f005850be7fde3a3dac6dc5323a6 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Wed, 24 Feb 2021 11:48:09 -0800 Subject: [PATCH] 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 Run-TryBot: Josh Bleecher Snyder Reviewed-by: Cherry Zhang TryBot-Result: Go Bot --- src/cmd/link/internal/ld/config.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cmd/link/internal/ld/config.go b/src/cmd/link/internal/ld/config.go index 481dc67475..291b28e11c 100644 --- a/src/cmd/link/internal/ld/config.go +++ b/src/cmd/link/internal/ld/config.go @@ -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) } }() } -- 2.50.0