This is an archive of the discontinued LLVM Phabricator instance.

Make the behavior of the -v option more closer to GNU linkers.
ClosedPublic

Authored by ruiu on Dec 4 2017, 3:09 PM.

Details

Summary

Previously, lld exited with an error status if the only option given to
the command is -v. GNU linkers gracefully exit in that case. This patch
makes lld behave like GNU.

Note that even with this patch, lld's -v and --version options behave
slightly differently than GNU linkers' counterparts. For example,
if you run ld.bfd -v -v, the version string is printed out twice.
But that is an edge case that I don't think we need to take care of.

Fixes https://bugs.llvm.org/show_bug.cgi?id=31582

Event Timeline

ruiu created this revision.Dec 4 2017, 3:09 PM
This revision was automatically updated to reflect the committed changes.