aboutsummaryrefslogtreecommitdiff
path: root/lld/MinGW
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2018-10-10 09:00:03 +0000
committerMartin Storsjo <martin@martin.st>2018-10-10 09:00:03 +0000
commit803b37ad5de61614a382c72bb7b3a69776a4fb82 (patch)
tree59eafcbfa4dc7b4eb1c467023aa7124788acffe3 /lld/MinGW
parent60b6f140cfc75fe4c519c2e3f2eb8a1d1278e1f6 (diff)
downloadllvm-project-803b37ad5de61614a382c72bb7b3a69776a4fb82.tar.gz
[MinGW] Pass libpath to the COFF linker
This is necessary for handling defaultlib directives embedded in object files, unless they use an absolute path. Differential Revision: https://reviews.llvm.org/D53015 llvm-svn: 344123
Diffstat (limited to 'lld/MinGW')
-rw-r--r--lld/MinGW/Driver.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lld/MinGW/Driver.cpp b/lld/MinGW/Driver.cpp
index dc9b046c5d13..d682baf592a1 100644
--- a/lld/MinGW/Driver.cpp
+++ b/lld/MinGW/Driver.cpp
@@ -216,8 +216,10 @@ bool mingw::link(ArrayRef<const char *> ArgsArr, raw_ostream &Diag) {
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;