summaryrefslogtreecommitdiff
path: root/lib/Linker
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/Linker.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Linker/Linker.cpp b/lib/Linker/Linker.cpp
index fba91da5dd..59fbceb6a3 100644
--- a/lib/Linker/Linker.cpp
+++ b/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.