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
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
gcc.maxerrorsimpl = "-fmax-errors=3"
|
||||||
|
|
||||||
@if macosx or freebsd or openbsd:
|
@if macosx or freebsd or openbsd:
|
||||||
cc = clang
|
cc = clang
|
||||||
tlsEmulation:on
|
tlsEmulation:on
|
||||||
gcc.options.always = "-w"
|
gcc.options.always %= "-w ${gcc.maxerrorsimpl}"
|
||||||
gcc.cpp.options.always = "-w -fpermissive"
|
gcc.cpp.options.always %= "-w ${gcc.maxerrorsimpl} -fpermissive"
|
||||||
@elif windows:
|
@elif windows:
|
||||||
gcc.options.always = "-w -mno-ms-bitfields"
|
gcc.options.always %= "-w ${gcc.maxerrorsimpl} -mno-ms-bitfields"
|
||||||
gcc.cpp.options.always = "-w -fpermissive -mno-ms-bitfields"
|
gcc.cpp.options.always %= "-w ${gcc.maxerrorsimpl} -fpermissive -mno-ms-bitfields"
|
||||||
@else:
|
@else:
|
||||||
gcc.options.always = "-w"
|
gcc.options.always %= "-w ${gcc.maxerrorsimpl}"
|
||||||
gcc.cpp.options.always = "-w -fpermissive"
|
gcc.cpp.options.always %= "-w ${gcc.maxerrorsimpl} -fpermissive"
|
||||||
@end
|
@end
|
||||||
|
|
||||||
# Configuration for Objective-C compiler:
|
# Configuration for Objective-C compiler:
|
||||||
|
|
@ -245,7 +247,7 @@ llvm_gcc.options.size = "-Os"
|
||||||
# Configuration for the LLVM CLang compiler:
|
# Configuration for the LLVM CLang compiler:
|
||||||
clang.options.debug = "-g"
|
clang.options.debug = "-g"
|
||||||
clang.cpp.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.speed = "-O3"
|
||||||
clang.options.size = "-Os"
|
clang.options.size = "-Os"
|
||||||
|
|
||||||
|
|
|
||||||
5
tests/misc/msizeof5.nim.cfg
Normal file
5
tests/misc/msizeof5.nim.cfg
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Do not limit number of error messages from backend compiler.
|
||||||
|
gcc.options.always %= "${gcc.options.always} -fmax-errors=100"
|
||||||
|
clang.options.always %= "${clang.options.always} -ferror-limit=100"
|
||||||
|
gcc.cpp.options.always %= "${gcc.cpp.options.always} -fmax-errors=100"
|
||||||
|
clang.cpp.options.always %= "${clang.cpp.options.always} -ferror-limit=100"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue