diff options
| author | George Rimar <grimar@accesssoftek.com> | 2017-07-26 09:21:10 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2017-07-26 09:21:10 +0000 |
| commit | 6977ec689961d234ce5912319b0e39b74182b82a (patch) | |
| tree | 223fb7b1f09f93f01d2202da0f52e848d6a32a2a | |
| parent | 5dbfa4e65b9eb907fbf1f25cf1ff8374171f414c (diff) | |
| download | bcm5719-llvm-6977ec689961d234ce5912319b0e39b74182b82a.tar.gz bcm5719-llvm-6977ec689961d234ce5912319b0e39b74182b82a.zip | |
[ELF] - Print options aliases in --help
This is PR30422,
previously LLD did not render all option aliases in --help.
With this patch it will.
Differential revision: https://reviews.llvm.org/D35477
llvm-svn: 309089
| -rw-r--r-- | lld/ELF/DriverUtils.cpp | 3 | ||||
| -rw-r--r-- | lld/test/ELF/help.s | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lld/ELF/DriverUtils.cpp b/lld/ELF/DriverUtils.cpp index a5876f8d778..463fa2a2b2f 100644 --- a/lld/ELF/DriverUtils.cpp +++ b/lld/ELF/DriverUtils.cpp @@ -116,7 +116,8 @@ opt::InputArgList ELFOptTable::parse(ArrayRef<const char *> Argv) { void elf::printHelp(const char *Argv0) { ELFOptTable Table; - Table.PrintHelp(outs(), Argv0, "lld", false); + Table.PrintHelp(outs(), Argv0, "lld", false /*ShowHidden*/, + true /*ShowAllAliases*/); outs() << "\n"; // Scripts generated by Libtool versions up to at least 2.4.6 (the most diff --git a/lld/test/ELF/help.s b/lld/test/ELF/help.s new file mode 100644 index 00000000000..2554531532b --- /dev/null +++ b/lld/test/ELF/help.s @@ -0,0 +1,5 @@ +# RUN: ld.lld --help 2>&1 | FileCheck %s +# CHECK: OPTIONS: +# CHECK: --output=<value> Path to file to write output +# CHECK: --output <value> Path to file to write output +# CHECK: -o <path> Path to file to write output |

