Skip to content

Commit e7a9ca0

Browse files
griesemergopherbot
authored andcommitted
cmd/compile: enable printing of error URLs by default
Change-Id: Ib4094c70b8aa5e818f9f017c59d464d4c178169d Reviewed-on: https://go-review.googlesource.com/c/go/+/497716 Auto-Submit: Robert Griesemer <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> Run-TryBot: Robert Griesemer <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent cf624a6 commit e7a9ca0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/cmd/compile/internal/base/flag.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ func ParseFlags() {
164164
Flag.LinkShared = &Ctxt.Flag_linkshared
165165
Flag.Shared = &Ctxt.Flag_shared
166166
Flag.WB = true
167+
Flag.ErrorURL = true
167168

168169
Debug.ConcurrentOk = true
169170
Debug.InlFuncsWithClosures = 1

src/cmd/internal/testdir/testdir_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func compileInDir(runcmd runCmd, dir string, flags []string, importcfg string, p
184184
if importcfg == "" {
185185
importcfg = stdlibImportcfgFile()
186186
}
187-
cmd := []string{goTool, "tool", "compile", "-e", "-D", "test", "-importcfg=" + importcfg}
187+
cmd := []string{goTool, "tool", "compile", "-e", "-D", "test", "-errorurl=false", "-importcfg=" + importcfg}
188188
if pkgname == "main" {
189189
cmd = append(cmd, "-p=main")
190190
} else {
@@ -201,7 +201,7 @@ func compileInDir(runcmd runCmd, dir string, flags []string, importcfg string, p
201201
return runcmd(cmd...)
202202
}
203203

204-
var stdlibImportcfgStringOnce sync.Once // TODO(#56102): Use sync.OnceValue once availabe. Also below.
204+
var stdlibImportcfgStringOnce sync.Once // TODO(#56102): Use sync.OnceValue once available. Also below.
205205
var stdlibImportcfgString string
206206

207207
func stdlibImportcfg() string {
@@ -745,7 +745,7 @@ func (t test) run() error {
745745
// Fail if wantError is true and compilation was successful and vice versa.
746746
// Match errors produced by gc against errors in comments.
747747
// TODO(gri) remove need for -C (disable printing of columns in error messages)
748-
cmdline := []string{goTool, "tool", "compile", "-p=p", "-d=panic", "-C", "-e", "-importcfg=" + stdlibImportcfgFile(), "-o", "a.o"}
748+
cmdline := []string{goTool, "tool", "compile", "-p=p", "-d=panic", "-C", "-e", "-errorurl=false", "-importcfg=" + stdlibImportcfgFile(), "-o", "a.o"}
749749
// No need to add -dynlink even if linkshared if we're just checking for errors...
750750
cmdline = append(cmdline, flags...)
751751
cmdline = append(cmdline, long)

0 commit comments

Comments
 (0)