Limit number of error messages from gcc/clang backend (#14852)
* Limit number of error messages from backend * Avoid duplication of -fmax-errors * make tests/misc/trunner.nim success
This commit is contained in:
parent
5bd2da3f64
commit
61a6098f2d
2 changed files with 14 additions and 7 deletions
|
|
@ -167,17 +167,19 @@ path="$lib/pure"
|
|||
@end
|
||||
@end
|
||||
|
||||
gcc.maxerrorsimpl = "-fmax-errors=3"
|
||||
|
||||
@if macosx or freebsd or openbsd:
|
||||
cc = clang
|
||||
tlsEmulation:on
|
||||
gcc.options.always = "-w"
|
||||
gcc.cpp.options.always = "-w -fpermissive"
|
||||
gcc.options.always %= "-w ${gcc.maxerrorsimpl}"
|
||||
gcc.cpp.options.always %= "-w ${gcc.maxerrorsimpl} -fpermissive"
|
||||
@elif windows:
|
||||
gcc.options.always = "-w -mno-ms-bitfields"
|
||||
gcc.cpp.options.always = "-w -fpermissive -mno-ms-bitfields"
|
||||
gcc.options.always %= "-w ${gcc.maxerrorsimpl} -mno-ms-bitfields"
|
||||
gcc.cpp.options.always %= "-w ${gcc.maxerrorsimpl} -fpermissive -mno-ms-bitfields"
|
||||
@else:
|
||||
gcc.options.always = "-w"
|
||||
gcc.cpp.options.always = "-w -fpermissive"
|
||||
gcc.options.always %= "-w ${gcc.maxerrorsimpl}"
|
||||
gcc.cpp.options.always %= "-w ${gcc.maxerrorsimpl} -fpermissive"
|
||||
@end
|
||||
|
||||
# Configuration for Objective-C compiler:
|
||||
|
|
@ -245,7 +247,7 @@ llvm_gcc.options.size = "-Os"
|
|||
# Configuration for the LLVM CLang compiler:
|
||||
clang.options.debug = "-g"
|
||||
clang.cpp.options.debug = "-g"
|
||||
clang.options.always = "-w"
|
||||
clang.options.always = "-w -ferror-limit=3"
|
||||
clang.options.speed = "-O3"
|
||||
clang.options.size = "-Os"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue