[lld] [LLD] [COFF] Prefer paths specified with -libpath: over toolchain paths (PR #78039)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 13 13:13:09 PST 2024
================
@@ -1548,14 +1548,14 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
{
llvm::TimeTraceScope timeScope2("Search paths");
searchPaths.emplace_back("");
+ for (auto *arg : args.filtered(OPT_libpath))
+ searchPaths.push_back(arg->getValue());
if (!config->mingw) {
// Prefer the Clang provided builtins over the ones bundled with MSVC.
// In MinGW mode, the compiler driver passes the necessary libpath
// options explicitly.
addClangLibSearchPaths(argsArr[0]);
}
- for (auto *arg : args.filtered(OPT_libpath))
- searchPaths.push_back(arg->getValue());
if (!config->mingw) {
----------------
mstorsjo wrote:
Oh, right, good point, will update.
https://github.com/llvm/llvm-project/pull/78039
More information about the llvm-commits
mailing list