diff options
| author | Rui Ueyama <ruiu@google.com> | 2018-02-23 20:24:28 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2018-02-23 20:24:28 +0000 |
| commit | eecdaaac2794f01d772d3b8e89db2b4febc975eb (patch) | |
| tree | da115f91cc851140fa9c8c5398b526fbb6b64d01 /lld/wasm/Driver.cpp | |
| parent | 69b8fa839104dc8a930ac7bc5bb8e8f636552764 (diff) | |
| download | bcm5719-llvm-eecdaaac2794f01d772d3b8e89db2b4febc975eb.tar.gz bcm5719-llvm-eecdaaac2794f01d772d3b8e89db2b4febc975eb.zip | |
Handle --version before handling --mllvm.
Because it's a waste of time to handle --mllvm before --version.
Differential Revision: https://reviews.llvm.org/D43527
llvm-svn: 325952
Diffstat (limited to 'lld/wasm/Driver.cpp')
| -rw-r--r-- | lld/wasm/Driver.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp index ad9e82e0fb1..ac0ec9d48f8 100644 --- a/lld/wasm/Driver.cpp +++ b/lld/wasm/Driver.cpp @@ -233,6 +233,12 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { return; } + // Handle --version + if (Args.hasArg(OPT_version) || Args.hasArg(OPT_v)) { + outs() << getLLDVersion() << "\n"; + return; + } + // Parse and evaluate -mllvm options. std::vector<const char *> V; V.push_back("wasm-ld (LLVM option parsing)"); @@ -242,11 +248,6 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { errorHandler().ErrorLimit = args::getInteger(Args, OPT_error_limit, 20); - if (Args.hasArg(OPT_version) || Args.hasArg(OPT_v)) { - outs() << getLLDVersion() << "\n"; - return; - } - Config->AllowUndefined = Args.hasArg(OPT_allow_undefined); Config->CheckSignatures = Args.hasFlag(OPT_check_signatures, OPT_no_check_signatures, false); |

