mirror of
https://github.com/golang/go.git
synced 2025-10-19 11:03:18 +00:00
cmd/link: add -e (no limit on errors) flag
The compiler and assembler have a -e flag that disables the limit on the number of errors before the build fails. This flag is useful for debugging, the linker should have it too. Change-Id: I892cfd6ee1519e9e86261af7d05e1af2ded21684 Reviewed-on: https://go-review.googlesource.com/c/go/+/646435 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
e7c9667def
commit
76c18e2ed2
3 changed files with 4 additions and 1 deletions
|
@ -72,6 +72,8 @@ Flags:
|
|||
system tools now assume the presence of the header.
|
||||
-dumpdep
|
||||
Dump symbol dependency graph.
|
||||
-e
|
||||
No limit on number of errors reported.
|
||||
-extar ar
|
||||
Set the external archive program (default "ar").
|
||||
Used only for -buildmode=c-archive.
|
||||
|
|
|
@ -108,6 +108,7 @@ var (
|
|||
flagEntrySymbol = flag.String("E", "", "set `entry` symbol name")
|
||||
flagPruneWeakMap = flag.Bool("pruneweakmap", true, "prune weak mapinit refs")
|
||||
flagRandLayout = flag.Int64("randlayout", 0, "randomize function layout")
|
||||
flagAllErrors = flag.Bool("e", false, "no limit on number of errors reported")
|
||||
cpuprofile = flag.String("cpuprofile", "", "write cpu profile to `file`")
|
||||
memprofile = flag.String("memprofile", "", "write memory profile to `file`")
|
||||
memprofilerate = flag.Int64("memprofilerate", 0, "set runtime.MemProfileRate to `rate`")
|
||||
|
|
|
@ -48,7 +48,7 @@ func afterErrorAction() {
|
|||
if *flagH {
|
||||
panic("error")
|
||||
}
|
||||
if nerrors > 20 {
|
||||
if nerrors > 20 && !*flagAllErrors {
|
||||
Exitf("too many errors")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue