[Lldb-commits] [lldb] [libcxx] [lld] [llvm] [compiler-rt] [lld-macho] Find objects in library search path (PR #78628)
Shoaib Meenai via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 18 17:13:35 PST 2024
================
@@ -95,11 +95,16 @@ static std::optional<StringRef> findLibrary(StringRef name) {
findPathCombination("lib" + name, config->librarySearchPaths,
{".tbd", ".dylib", ".so"}))
return path;
- return findPathCombination("lib" + name, config->librarySearchPaths,
- {".a"});
+ else if (std::optional<StringRef> path = findPathCombination(
+ "lib" + name, config->librarySearchPaths, {".a"}))
+ return path;
+ return findPathCombination(name, config->librarySearchPaths, {""});
----------------
smeenai wrote:
You're right; that was a think-o on my part :) That being said, the scenario in my first comment (except with `/bar/libcrt1.o.a`) still applies; it's an edge case, but if we're matching ld64 behavior, we might as well match it as closely as reasonable.
https://github.com/llvm/llvm-project/pull/78628
More information about the lldb-commits
mailing list