This is an archive of the discontinued LLVM Phabricator instance.

[mac/lld] Run tests with -fatal_warnings by default
ClosedPublic

Authored by thakis on Dec 3 2020, 6:38 AM.

Details

Reviewers
int3
Group Reviewers
Restricted Project
Commits
rG305852686bf5: [mac/lld] Run tests with -fatal_warnings by default
Summary

This helps us catch cases where we add support for a flag but forget to
remove HelpHidden from Options.td.

More explicit alternative to D92455

Diff Detail

Event Timeline

thakis requested review of this revision.Dec 3 2020, 6:38 AM
thakis created this revision.
MaskRay added a subscriber: MaskRay.Dec 3 2020, 9:08 AM

I don't think we should add -fatal_warnings to %lld. We should test that whether a diagnostic is a warning or error.

The tests that check for warnings (there's currently just one) all use %no_fatal_warnings_lld. That's still testable with this patch.

The motivation here is that lld/MachO warns on options that are marked HelpHidden and there were several instances were someone implemented a flag but forgot to remove HelpHidden, and then lld still warned about the flag not being implemented even though it is. This prevents that type of error. Also see discussion on D92455 -- I strongly prefer this patch here over that other one.

Interesting, I expected a large fallout. I think I agree with @thakis that this is preferable to D92455.

int3 accepted this revision.Dec 3 2020, 3:17 PM
int3 added a subscriber: int3.

lgtm with the test changes from D92455. Thanks!

This revision is now accepted and ready to land.Dec 3 2020, 3:17 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptDec 3 2020, 6:28 PM