[lld] r203891 - [PECOFF] Fix arguments passed to lib.exe.

Rui Ueyama ruiu at google.com
Thu Mar 13 22:04:08 PDT 2014


Author: ruiu
Date: Fri Mar 14 00:04:08 2014
New Revision: 203891

URL: http://llvm.org/viewvc/llvm-project?rev=203891&view=rev
Log:
[PECOFF] Fix arguments passed to lib.exe.

Modified:
    lld/trunk/lib/Driver/WinLinkDriver.cpp
    lld/trunk/test/pecoff/libarg.test

Modified: lld/trunk/lib/Driver/WinLinkDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkDriver.cpp?rev=203891&r1=203890&r2=203891&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Fri Mar 14 00:04:08 2014
@@ -732,7 +732,7 @@ static bool maybeRunLibCommand(int argc,
     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;
 }

Modified: lld/trunk/test/pecoff/libarg.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/pecoff/libarg.test?rev=203891&r1=203890&r2=203891&view=diff
==============================================================================
--- lld/trunk/test/pecoff/libarg.test (original)
+++ lld/trunk/test/pecoff/libarg.test Fri Mar 14 00:04:08 2014
@@ -5,4 +5,5 @@
 # RUN: lld -flavor link /lib >& %t.log
 # RUN: FileCheck %s < %t.log
 
+CHECK-NOT: unrecognized option '/lib'
 CHECK: usage: LIB





More information about the llvm-commits mailing list