]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/asm: add -e flag (no limit on errors) to match compiler
authorRuss Cox <rsc@golang.org>
Fri, 22 Jan 2016 14:49:48 +0000 (09:49 -0500)
committerRuss Cox <rsc@golang.org>
Sun, 24 Jan 2016 05:01:00 +0000 (05:01 +0000)
Change-Id: I5b749c575e0ec78fb3c50d056899bd1fe5d91853
Reviewed-on: https://go-review.googlesource.com/18847
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/asm/internal/asm/parse.go
src/cmd/asm/internal/flags/flags.go

index 9a42838be90acbd73c41eadcbcfeebbc470d995e..4258c5ce263f0f58ed9d9035410b24343bdae40e 100644 (file)
@@ -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")
        }
 }
index 89bc6f3a8c2f33fe657c5b0037f4da409a80cb76..fd42e8443b5ab8d9ee1ae5eb49f15b1884afb2c9 100644 (file)
@@ -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 (