[llvm-commits] [llvm] r140201 - /llvm/trunk/lib/Linker/Linker.cpp

Ivan Krasin krasin at chromium.org
Tue Sep 20 15:52:35 PDT 2011


Author: krasin
Date: Tue Sep 20 17:52:35 2011
New Revision: 140201

URL: http://llvm.org/viewvc/llvm-project?rev=140201&view=rev
Log:
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.


Modified:
    llvm/trunk/lib/Linker/Linker.cpp

Modified: llvm/trunk/lib/Linker/Linker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/Linker.cpp?rev=140201&r1=140200&r2=140201&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/Linker.cpp (original)
+++ llvm/trunk/lib/Linker/Linker.cpp Tue Sep 20 17:52:35 2011
@@ -141,6 +141,14 @@
   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.





More information about the llvm-commits mailing list