Commit 02717bdc authored by Russ Cox's avatar Russ Cox

cmd/asm: add -e flag (no limit on errors) to match compiler

Change-Id: I5b749c575e0ec78fb3c50d056899bd1fe5d91853
Reviewed-on: https://go-review.googlesource.com/18847Reviewed-by: default avatarRob Pike <r@golang.org>
parent d2b0c387
......@@ -16,6 +16,7 @@ import (
"unicode/utf8"
"cmd/asm/internal/arch"
"cmd/asm/internal/flags"
"cmd/asm/internal/lex"
"cmd/internal/obj"
)
......@@ -78,7 +79,7 @@ func (p *Parser) errorf(format string, args ...interface{}) {
}
fmt.Fprintf(p.errorWriter, format, args...)
p.errorCount++
if p.errorCount > 10 {
if p.errorCount > 10 && !*flags.AllErrors {
log.Fatal("too many errors")
}
}
......
......@@ -20,6 +20,7 @@ var (
TrimPath = flag.String("trimpath", "", "remove prefix from recorded source file paths")
Shared = flag.Bool("shared", false, "generate code that can be linked into a shared library")
Dynlink = flag.Bool("dynlink", false, "support references to Go symbols defined in other shared libraries")
AllErrors = flag.Bool("e", false, "no limit on number of errors reported")
)
var (
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment