This is an archive of the discontinued LLVM Phabricator instance.

Show "Unknown -z option" error message early.
ClosedPublic

Authored by ruiu on Dec 7 2018, 10:23 AM.

Details

Summary

Previously, we would show an error message for an unknown command line flag
(e.g. --foo) but we wouldn't show that for an unknown -z option (e.g. -z foo).
That's inconsistent. With this patch, we always show an error message for an
unknown -z option.

Diff Detail

Repository
rL LLVM

Event Timeline

ruiu created this revision.Dec 7 2018, 10:23 AM
thakis accepted this revision.Dec 7 2018, 4:49 PM
thakis added a subscriber: thakis.

Patch LGTM, but the description looks wrong to me:

lld/test/ELF/driver.test
62 ↗(On Diff #177248)

This test suggests that the patch description isn't quite right -- lld already prints an error for unknown -z flags. The only effect this patch has is that it now also does this if --version or --help is passed, right?

This revision is now accepted and ready to land.Dec 7 2018, 4:49 PM

LGTM with the description clarification.

lld/test/ELF/driver.test
62 ↗(On Diff #177248)

+1

grimar accepted this revision.Dec 10 2018, 12:36 AM

Was this forgotten?

Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2019, 5:51 AM
This revision was automatically updated to reflect the committed changes.