This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Make printHelp() print all targets supported.
AbandonedPublic

Authored by grimar on Feb 6 2018, 2:59 AM.

Details

Summary

We hardcode target names in printHelp.
As a result it is easy to forget to update this list
when new target is added.

For example we did not list elf32-avr and
elf64-sparc targets though support them.

Patch refactors printHelp() implementation
to fix the issue.

Diff Detail

Event Timeline

grimar created this revision.Feb 6 2018, 2:59 AM
ruiu added a comment.Feb 6 2018, 2:47 PM

I don't think I like this patch because it makes things more complicated than it can be. "Supported targets" are just informative for compatibility with GNU linkers, and it doesn't change often. I'm more comfortable with the current code than this one.

grimar abandoned this revision.Feb 7 2018, 12:16 AM

Abandoning in favor of D42992 solution.