<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 3, 2019 at 12:16 PM Fabiano Sidler via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi folks!<br>
<br>
I have a couple of questions:<br>
1. Why is LLVM_LINK_LLVM_DYLIB not ON by default? Who needs a 2+GB bin/clang?<br></blockquote><div><br>Because dynamic linking is slow - last I checked, at least for me/my setup, the extra time spent in static linking was less than the time spent dynamic linking when running all of LLVM & Clang's regression tests.<br><br>(that said, my clang binary is only 687MB - I guess yours is 2GB because you're using debug info without split-dwarf (try LLVM_USE_SPLIT_DWARF if it's suitable for your needs))<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2. Why is BUILD_SHARED_LIBS output smaller than the one generated with<br>
   LLVM_LINK_LLVM_DYLIB? Shouldn't it be the other way since the latter saves<br>
   a lot of header information?<br>
3. To make things easier for people who only want to compile llvm, clang and<br>
   libcxx*, a small snippet like the following on a prominent place would be<br>
   nice:<br>
=== snip ===<br>
VERSION=8.0.1<br>
wget <a href="https://github.com/llvm/llvm-project/releases/download/llvmorg-$%7BVERSION%7D/llvm-$%7BVERSION%7D.src.tar.xz" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/releases/download/llvmorg-${VERSION}/llvm-${VERSION}.src.tar.xz</a><br>
wget <a href="https://github.com/llvm/llvm-project/releases/download/llvmorg-$%7BVERSION%7D/cfe-$%7BVERSION%7D.src.tar.xz" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/releases/download/llvmorg-${VERSION}/cfe-${VERSION}.src.tar.xz</a><br>
wget <a href="https://github.com/llvm/llvm-project/releases/download/llvmorg-$%7BVERSION%7D/libcxx-$%7BVERSION%7D.src.tar.xz" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/releases/download/llvmorg-${VERSION}/libcxx-${VERSION}.src.tar.xz</a><br>
wget <a href="https://github.com/llvm/llvm-project/releases/download/llvmorg-$%7BVERSION%7D/libcxxabi-$%7BVERSION%7D.src.tar.xz" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/releases/download/llvmorg-${VERSION}/libcxxabi-${VERSION}.src.tar.xz</a><br>
tar xf llvm-${VERSION}.src.tar.xz<br>
tar xf cfe-${VERSION}.src.tar.xz<br>
tar xf libcxx-${VERSION}.src.tar.xz<br>
tar xf libcxxabi-${VERSION}.src.tar.xz<br>
mv cfe-${VERSION}.src llvm-${VERSION}.src/projects<br>
mv libcxx-${VERSION}.src llvm-${VERSION}.src/projects<br>
mv libcxxabi-${VERSION}.src llvm-${VERSION}.src/projects<br>
mkdir build<br>
cd build<br>
cmake \<br>
  -DLLVM_ENABLE_FFI=ON \<br>
  -DCMAKE_BUILD_TYPE=Release \<br>
  -DLLVM_ENABLE_RTTI=ON \<br>
  -DLLVM_TARGETS_TO_BUILD="host" \<br>
  -DBUILD_SHARED_LIBS=ON \<br>
  ../llvm-${VERSION}.src<br>
cmake --build .<br>
cmake -DCMAKE_INSTALL_PREFIX=/some/where -P cmake_install.cmake<br>
=== snap ===<br>
<br>
Greetings,<br>
Fabiano<br>
_______________________________________________<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="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>