diff options
author | Ivan Krasin <krasin@chromium.org> | 2011-09-20 22:52:35 +0000 |
---|---|---|
committer | Ivan Krasin <krasin@chromium.org> | 2011-09-20 22:52:35 +0000 |
commit | 5f2318e06549c0ec2bf21b3ce4690921f4a2422b (patch) | |
tree | 3b40ff5a120332d485d4d101d67161d89ca56184 /lib/Linker/Linker.cpp | |
parent | 149f29f1fdd3f806fcc2570173105d27d718bd1d (diff) |
lib/Linker: add support of deps which does not end with ".so".
It happens (for example) when you want to have a dependency on the .so
with the specific version, like liblzma.so.1.0.0 or
libcrypto.so.0.9.8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker/Linker.cpp')
-rw-r--r-- | lib/Linker/Linker.cpp | 8 |
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. |