Skip to content
This repository was archived by the owner on Dec 20, 2019. It is now read-only.

Commit 7439576

Browse files
committed
WebAssembly: Avoid parsing -mllvm* command-line options if there aren't any
1 parent a55ceac commit 7439576

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

wasm/Driver.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) {
225225
V.push_back("wasm-ld (LLVM option parsing)");
226226
for (auto *Arg : Args.filtered(OPT_mllvm))
227227
V.push_back(Arg->getValue());
228-
cl::ParseCommandLineOptions(V.size(), V.data());
228+
if (V.size() > 1)
229+
cl::ParseCommandLineOptions(V.size(), V.data());
229230

230231
errorHandler().ErrorLimit = args::getInteger(Args, OPT_error_limit, 20);
231232

0 commit comments

Comments
 (0)