This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Implement -fatal_warnings
ClosedPublic

Authored by thakis on Nov 20 2020, 1:45 PM.

Details

Reviewers
int3
Group Reviewers
Restricted Project
Commits
rGc0e4020c9271: [lld-macho] Implement -fatal_warnings

Diff Detail

Event Timeline

thakis created this revision.Nov 20 2020, 1:45 PM
thakis requested review of this revision.Nov 20 2020, 1:45 PM
int3 added a reviewer: Restricted Project.Nov 29 2020, 8:57 PM
int3 added a subscriber: gkm.

cc @gkm who implemented most of the option parsing

lld/MachO/Options.td
611

these groups are based on the groups used in the ld64 manpage. I think we should keep them, though I wouldn't object to defining a new group if you think it'd be more fitting

thakis updated this revision to Diff 308332.Nov 30 2020, 5:22 AM

restore group

lld/MachO/Options.td
611

Oh, turns out this one can stay grp_rare, put it back. What confused me was that grp_undocumented causes warnings, so I had to remove grp_undocumented on -demangle in D91884. Which group should I use for that one?

int3 accepted this revision.Nov 30 2020, 6:24 AM
int3 added inline comments.
lld/MachO/Options.td
611

hmm I had a look at the current set of possible groups and none of them look like a great fit. However, grp_rare does seem to be a dumping ground for a variety of options that don't seem rare so much as miscellaneous. I guess we could put -demangle there too.

Another option would be to create a new group, e.g. grp_diagnostics, and put things like -fatal_warnings and -demangle there. I'm fine with either.

This revision is now accepted and ready to land.Nov 30 2020, 6:24 AM

Thanks!

lld/MachO/Options.td
611

grp_rare kind of fits for -demangle, but clang passes it on literally every single lld invocation, so it isn't "rare" in the english meaning of that word. Not sure we care. If there's no explicit group, it shows up in the "OPTIONS" category, which is where old mach-o lld has it, which seems like a decent fit to me as well.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptNov 30 2020, 6:29 AM