[Lldb-commits] [libcxx] [llvm] [lldb] [compiler-rt] [lld] [lld-macho] Find objects in library search path (PR #78628)
@@ -95,11 +95,16 @@ static std::optional findLibrary(StringRef name) { findPathCombination("lib" + name, config->librarySearchPaths, {".tbd", ".dylib", ".so"})) return path; - return findPathCombination("lib" + name, config->librarySearchPaths, - {".a"}); + else if (std::optional path = findPathCombination( + "lib" + name, config->librarySearchPaths, {".a"})) +return path; + return findPathCombination(name, config->librarySearchPaths, {""}); OldWorldOrdr wrote: removing the object and trying again gives an error, ld64 wont link with the .a file at all https://github.com/llvm/llvm-project/pull/78628 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [libcxx] [llvm] [lldb] [compiler-rt] [lld] [lld-macho] Find objects in library search path (PR #78628)
@@ -95,11 +95,16 @@ static std::optional findLibrary(StringRef name) { findPathCombination("lib" + name, config->librarySearchPaths, {".tbd", ".dylib", ".so"})) return path; - return findPathCombination("lib" + name, config->librarySearchPaths, - {".a"}); + else if (std::optional path = findPathCombination( + "lib" + name, config->librarySearchPaths, {".a"})) +return path; + return findPathCombination(name, config->librarySearchPaths, {""}); smeenai wrote: Hmm. In that case, we probably want to instead change `findPathCombination` to take a list of prefixes, so that we can match ld64's search behavior? https://github.com/llvm/llvm-project/pull/78628 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits