[llvm-dev] Building SVN head with CMake - shared libraries?

David Jones via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 13 19:02:06 PST 2016


Now that autoconf is going away soon, I figured I'd try building using
CMake.

I checked out llvm, cfe and lldb from the SVN server, and followed the
basic build instructions.

cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/tools/llvm/svn_head
-DLLVM_TARGETS_TO_BUILD="X86;CppBackend" -DCMAKE_BUILD_TYPE=Release
-DLLVM_ENABLE_ASSERTIONS=ON ../llvm

Everything worked well, and in the end I got the following shared libraries:

/tools/llvm/svn_head/lib/BugpointPasses.so
/tools/llvm/svn_head/lib/libclang.so
/tools/llvm/svn_head/lib/libclang.so.3.9
/tools/llvm/svn_head/lib/liblldb.so
/tools/llvm/svn_head/lib/liblldb.so.3.9.0
/tools/llvm/svn_head/lib/libLTO.so
/tools/llvm/svn_head/lib/LLVMHello.so

However, with an autoconf build, I am used to seeing a libLLVM.so. From a
3.7.1 autoconf build:

/tools/llvm/3.7.1dbg/lib/BugpointPasses.so
/tools/llvm/3.7.1dbg/lib/libclang.so
/tools/llvm/3.7.1dbg/lib/liblldb.so
/tools/llvm/3.7.1dbg/lib/libLLVM-3.7.1.so
/tools/llvm/3.7.1dbg/lib/libLLVM-3.7.so
/tools/llvm/3.7.1dbg/lib/libLTO.so
/tools/llvm/3.7.1dbg/lib/LLVMHello.so

I'd like to get libLLVM with the CMake build as well. But if I try
-DBUILD_SHARED_LIBS=ON, lldb-server fails to link properly and I cannot
install anything.

Is this a bug in the make scripts for lldb-server?
How can I get libLLVM.so in addition to liblldb.so?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160113/ecb88fec/attachment.html>


More information about the llvm-dev mailing list