diff options
Diffstat (limited to 'contrib/llvm/lib/Linker/Linker.cpp')
-rw-r--r-- | contrib/llvm/lib/Linker/Linker.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Linker/Linker.cpp b/contrib/llvm/lib/Linker/Linker.cpp index fba91da..59fbceb 100644 --- a/contrib/llvm/lib/Linker/Linker.cpp +++ b/contrib/llvm/lib/Linker/Linker.cpp @@ -141,6 +141,14 @@ static inline sys::Path IsLibrary(StringRef Name, if (FullPath.isBitcodeFile()) // .so file containing bitcode? return FullPath; + // Try libX form, to make it possible to add dependency on the + // specific version of .so, like liblzma.so.1.0.0 + FullPath.eraseSuffix(); + if (FullPath.isDynamicLibrary()) // Native shared library? + return FullPath; + if (FullPath.isBitcodeFile()) // .so file containing bitcode? + return FullPath; + // Not found .. fall through // Indicate that the library was not found in the directory. |