This maps to -errorlimit:<N> in the COFF linker and is functionally
identical to the same option in the ELF and MachO linker.
Details
- Reviewers
mstorsjo rnk - Commits
- rGde4364f1ecaa: [LLD][MinGW] Add --error-limit=<N> option
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Looks fine to me overall, one minor nit to address, and a little discussion on some details.
lld/MinGW/Driver.cpp | ||
---|---|---|
397 | It's somewhat unusual to interpret the argument values that much in the mingw driver (except in the cases where they need to be rewritten), but I see the intent of making the error message mention the right name - so it's probably fine. (Technically I guess we have that issue for any other argument too, where we just pass values on blindly, and the COFF linker may complain about their values later on.) | |
lld/test/MinGW/error-limit.test | ||
12 | I think it'd be nice with a : after the option name here; in the case of the COFF driver, the option name itself contains it so there's no need, but e.g. the ELF linker seems to manually add it in some similar cases. | |
14 | I think we don't have any lld mingw driver tests that actually invoke the coff linker, all of them just use -### to see what it outputs. Strictly speaking, we tend to avoid such tests, although this one seems harmless (although kinda redundant, as this gets covered in total by the other testcases too)? |
It's somewhat unusual to interpret the argument values that much in the mingw driver (except in the cases where they need to be rewritten), but I see the intent of making the error message mention the right name - so it's probably fine.
(Technically I guess we have that issue for any other argument too, where we just pass values on blindly, and the COFF linker may complain about their values later on.)