[llvm-dev] Building SVN head with CMake - shared libraries?
David Jones via llvm-dev
llvm-dev at lists.llvm.org
Thu Jan 14 03:24:24 PST 2016
Thanks - I'll try this tonight.
Assuming it works, should these variables be added to the docs at
On Wed, Jan 13, 2016 at 10:26 PM, Andrew Wilkins <axwalk at gmail.com> wrote:
> On Thu, 14 Jan 2016 at 11:02 David Jones via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>> Now that autoconf is going away soon, I figured I'd try building using
>> 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
>> However, with an autoconf build, I am used to seeing a libLLVM.so. From a
>> 3.7.1 autoconf build:
>> 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?
> -DBUILD_SHARED_LIBS=ON will give you shared libraries for each component
> (libLLVMSupport.so instead of libLLVMSupport.a, etc.)
> What you want to set is -DLLVM_BUILD_LLVM_DYLIB=ON. For this to work, you
> must *not* set -DBUILD_SHARED_LIBS=ON.
> If you also want all the tools (clang, llvm-*, etc.) to link against
> libLLVM.so, you'll want to set -DLLVM_LINK_LLVM_DYLIB=ON, otherwise you'll
> have libLLVM.so but the tools will be linked against the static libraries.
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev