HomePhabricator

Limit default maximum number of errors to 20.

Description

Limit default maximum number of errors to 20.

This is in the context of https://llvm.org/bugs/show_bug.cgi?id=31109.
When LLD prints out errors for relocations, it tends to print out
extremely large number of errors (like millions) because it would
print out one error per relocation.

This patch makes LLD bail out if it prints out more than 20 errors.
You can configure the limitation using -error-limit argument.
-error-limit=0 means no limit.

I chose the flag name because Clang has the same feature as -ferror-limit.
"f" doesn't make sense to us, so I omitted it.

Differential Revision: https://reviews.llvm.org/D26981

Details

Committed
ruiuNov 23 2016, 10:15 AM
Differential Revision
D26981: Limit maximum number of errors to 1000.
Parents
rL287788: Re-commit r287727: Use SHA1::hash and MD5::hash functions.
Branches
Unknown
Tags
Unknown