summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/lib/Driver/WinLinkDriver.cpp2
-rw-r--r--lld/test/pecoff/libarg.test1
2 files changed, 2 insertions, 1 deletions
diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp
index 393bc99e4d1..631bfe369cb 100644
--- a/lld/lib/Driver/WinLinkDriver.cpp
+++ b/lld/lib/Driver/WinLinkDriver.cpp
@@ -732,7 +732,7 @@ static bool maybeRunLibCommand(int argc, const char **argv, raw_ostream &diag) {
vec.push_back(argv[i]);
vec.push_back(nullptr);
- if (llvm::sys::ExecuteAndWait(path.c_str(), &argv[0]) != 0)
+ if (llvm::sys::ExecuteAndWait(path.c_str(), &vec[0]) != 0)
diag << "lib.exe failed\n";
return true;
}
diff --git a/lld/test/pecoff/libarg.test b/lld/test/pecoff/libarg.test
index b5b25fd2af3..314f030c4fe 100644
--- a/lld/test/pecoff/libarg.test
+++ b/lld/test/pecoff/libarg.test
@@ -5,4 +5,5 @@
# RUN: lld -flavor link /lib >& %t.log
# RUN: FileCheck %s < %t.log
+CHECK-NOT: unrecognized option '/lib'
CHECK: usage: LIB
OpenPOWER on IntegriCloud