Make the behavior of the -v option more closer to GNU linkers.
Previously, lld exited with an error status if the only option given to the command was -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 Differential Revision: https://reviews.llvm.org/D40810 llvm-svn: 319717
Loading
Please sign in to comment