This is an archive of the discontinued LLVM Phabricator instance.

[COFF] support /ERRORLIMIT option
ClosedPublic

Authored by inglorion on Feb 7 2017, 4:08 PM.

Details

Summary

This adds support for reporting multiple errors in a single invocation of lld-link. The limit defaults to 20 and can be changed with the /ERRORLIMIT command line parameter, or set to unlimited by passing a value of 0.

Diff Detail

Repository
rL LLVM

Event Timeline

inglorion created this revision.Feb 7 2017, 4:08 PM
ruiu added inline comments.Feb 8 2017, 1:17 PM
COFF/Driver.cpp
160–164 ↗(On Diff #87541)

nit: when you add {}, please add {} to other if-elseif-else.

543–545 ↗(On Diff #87541)

Ditto

616–638 ↗(On Diff #87541)

I think it is not safe to continue with wrong values. After you parse all command line options, you want to check if ErrorCount == 0, and if it is not, you should exit.

745–746 ↗(On Diff #87541)

Braces.

inglorion updated this revision to Diff 88956.Feb 17 2017, 2:28 PM
inglorion marked 4 inline comments as done.

changes requested by @ruiu

ruiu accepted this revision.Feb 17 2017, 2:35 PM

LGTM

This revision is now accepted and ready to land.Feb 17 2017, 2:35 PM
This revision was automatically updated to reflect the committed changes.

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/2851/steps/check-lld%20msan/logs/stdio

Exit Code: 1

Command Output (stderr):
--
/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/lld/test/COFF/error-limit.test:30:8: error: expected string not found in input
WRONG: could not open 01
       ^
<stdin>:3:1: note: scanning from here

^