[PATCH] D53015: [LLD] [MinGW] Pass libpath to the COFF linker

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 10 02:03:36 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL344123: [MinGW] Pass libpath to the COFF linker (authored by mstorsjo, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D53015?vs=168756&id=168950#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D53015

Files:
  lld/trunk/MinGW/Driver.cpp
  lld/trunk/test/MinGW/driver.test


Index: lld/trunk/MinGW/Driver.cpp
===================================================================
--- lld/trunk/MinGW/Driver.cpp
+++ lld/trunk/MinGW/Driver.cpp
@@ -216,8 +216,10 @@
     Add("-include:" + StringRef(A->getValue()));
 
   std::vector<StringRef> SearchPaths;
-  for (auto *A : Args.filtered(OPT_L))
+  for (auto *A : Args.filtered(OPT_L)) {
     SearchPaths.push_back(A->getValue());
+    Add("-libpath:" + StringRef(A->getValue()));
+  }
 
   StringRef Prefix = "";
   bool Static = false;
Index: lld/trunk/test/MinGW/driver.test
===================================================================
--- lld/trunk/test/MinGW/driver.test
+++ lld/trunk/test/MinGW/driver.test
@@ -148,3 +148,6 @@
 
 RUN: ld.lld -### foo.o -m i386pe -require-defined _foo --require-defined _bar -require-defined=_baz --require-defined=_foo2 | FileCheck -check-prefix=REQUIRE-DEFINED %s
 REQUIRE-DEFINED: -include:_foo -include:_bar -include:_baz -include:_foo2
+
+RUN: ld.lld -### -m i386pep foo.o -Llibpath | FileCheck -check-prefix LIBPATH %s
+LIBPATH: -libpath:libpath


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53015.168950.patch
Type: text/x-patch
Size: 1068 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181010/fe605eb8/attachment.bin>


More information about the llvm-commits mailing list