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
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;
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