<div dir="ltr"><div>Thanks - I'll try this tonight.<br><br></div>Assuming it works, should these variables be added to the docs at <a href="http://llvm.org/docs/CMake.html">http://llvm.org/docs/CMake.html</a> ?<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 13, 2016 at 10:26 PM, Andrew Wilkins <span dir="ltr"><<a href="mailto:axwalk@gmail.com" target="_blank">axwalk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Thu, 14 Jan 2016 at 11:02 David Jones via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Now that autoconf is going away soon, I figured I'd try building using CMake.<br><br></div>I checked out llvm, cfe and lldb from the SVN server, and followed the basic build instructions. <br><br>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<br><br>Everything worked well, and in the end I got the following shared libraries:<br><br>/tools/llvm/svn_head/lib/BugpointPasses.so<br>/tools/llvm/svn_head/lib/libclang.so<br>/tools/llvm/svn_head/lib/libclang.so.3.9<br>/tools/llvm/svn_head/lib/liblldb.so<br>/tools/llvm/svn_head/lib/liblldb.so.3.9.0<br>/tools/llvm/svn_head/lib/libLTO.so<br>/tools/llvm/svn_head/lib/LLVMHello.so<br><br></div>However, with an autoconf build, I am used to seeing a libLLVM.so. From a 3.7.1 autoconf build:<br><br>/tools/llvm/3.7.1dbg/lib/BugpointPasses.so<br>/tools/llvm/3.7.1dbg/lib/libclang.so<br>/tools/llvm/3.7.1dbg/lib/liblldb.so<br>/tools/llvm/3.7.1dbg/lib/<a href="http://libLLVM-3.7.1.so" target="_blank">libLLVM-3.7.1.so</a><br>/tools/llvm/3.7.1dbg/lib/<a href="http://libLLVM-3.7.so" target="_blank">libLLVM-3.7.so</a><br>/tools/llvm/3.7.1dbg/lib/libLTO.so<br>/tools/llvm/3.7.1dbg/lib/LLVMHello.so<br><br></div>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.<br><br></div>Is this a bug in the make scripts for lldb-server?<br></div>How can I get libLLVM.so in addition to liblldb.so?<br></div></blockquote><div><br></div></div></div><div>-DBUILD_SHARED_LIBS=ON will give you shared libraries for each component (libLLVMSupport.so instead of libLLVMSupport.a, etc.)</div><div><br></div><div>What you want to set is -DLLVM_BUILD_LLVM_DYLIB=ON. For this to work, you must *not* set -DBUILD_SHARED_LIBS=ON.</div><div><br></div><div>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.</div><div><br></div><div>HTH,</div><div>Andrew</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>
</blockquote></div><br></div>