forked from OSchip/llvm-project
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
This commit is contained in:
parent
69b8fa8391
commit
eecdaaac27
|
@ -233,6 +233,12 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle --version
|
||||||
|
if (Args.hasArg(OPT_version) || Args.hasArg(OPT_v)) {
|
||||||
|
outs() << getLLDVersion() << "\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Parse and evaluate -mllvm options.
|
// Parse and evaluate -mllvm options.
|
||||||
std::vector<const char *> V;
|
std::vector<const char *> V;
|
||||||
V.push_back("wasm-ld (LLVM option parsing)");
|
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);
|
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->AllowUndefined = Args.hasArg(OPT_allow_undefined);
|
||||||
Config->CheckSignatures =
|
Config->CheckSignatures =
|
||||||
Args.hasFlag(OPT_check_signatures, OPT_no_check_signatures, false);
|
Args.hasFlag(OPT_check_signatures, OPT_no_check_signatures, false);
|
||||||
|
|
Loading…
Reference in New Issue