[PATCH] D55446: Show "Unknown -z option" error message early.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 13 10:48:27 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL353967: Show "Unknown -z option" error message even if --version or --help are given. (authored by ruiu, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D55446?vs=177248&id=186696#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55446/new/
https://reviews.llvm.org/D55446
Files:
lld/trunk/ELF/Driver.cpp
lld/trunk/test/ELF/driver.test
Index: lld/trunk/test/ELF/driver.test
===================================================================
--- lld/trunk/test/ELF/driver.test
+++ lld/trunk/test/ELF/driver.test
@@ -60,6 +60,7 @@
# ERR9: cannot open output file utput=/no/such/file
# RUN: not ld.lld %t -z foo 2>&1 | FileCheck -check-prefix=ERR10 %s
+# RUN: not ld.lld %t -z foo --version 2>&1 | FileCheck -check-prefix=ERR10 %s
# ERR10: unknown -z value: foo
## Check we report "unknown -z value" error even with -v.
Index: lld/trunk/ELF/Driver.cpp
===================================================================
--- lld/trunk/ELF/Driver.cpp
+++ lld/trunk/ELF/Driver.cpp
@@ -370,6 +370,7 @@
// Interpret this flag early because error() depends on them.
errorHandler().ErrorLimit = args::getInteger(Args, OPT_error_limit, 20);
+ checkZOptions(Args);
// Handle -help
if (Args.hasArg(OPT_help)) {
@@ -410,7 +411,6 @@
}
readConfigs(Args);
- checkZOptions(Args);
// The behavior of -v or --version is a bit strange, but this is
// needed for compatibility with GNU linkers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55446.186696.patch
Type: text/x-patch
Size: 1080 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190213/d9eabea3/attachment.bin>
More information about the llvm-commits
mailing list