diff options
| author | Rui Ueyama <ruiu@google.com> | 2014-03-14 05:04:08 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2014-03-14 05:04:08 +0000 |
| commit | ebffa9b4be04c9fd9f48f2822a6c6a1601b6c4dd (patch) | |
| tree | f9c9501321796170ad1e9284c36657516dd80147 | |
| parent | ec5d480329e522ccd47cc191e8d4a0c99d4fa04b (diff) | |
| download | bcm5719-llvm-ebffa9b4be04c9fd9f48f2822a6c6a1601b6c4dd.tar.gz bcm5719-llvm-ebffa9b4be04c9fd9f48f2822a6c6a1601b6c4dd.zip | |
[PECOFF] Fix arguments passed to lib.exe.
llvm-svn: 203891
| -rw-r--r-- | lld/lib/Driver/WinLinkDriver.cpp | 2 | ||||
| -rw-r--r-- | lld/test/pecoff/libarg.test | 1 |
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 |

