[llvm-dev] LLVM questions

Fabiano Sidler via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 3 12:16:11 PDT 2019


Hi folks!

I have a couple of questions:
1. Why is LLVM_LINK_LLVM_DYLIB not ON by default? Who needs a 2+GB bin/clang?
2. Why is BUILD_SHARED_LIBS output smaller than the one generated with
   LLVM_LINK_LLVM_DYLIB? Shouldn't it be the other way since the latter saves
   a lot of header information?
3. To make things easier for people who only want to compile llvm, clang and
   libcxx*, a small snippet like the following on a prominent place would be
   nice:
=== snip ===
VERSION=8.0.1
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-${VERSION}/llvm-${VERSION}.src.tar.xz
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-${VERSION}/cfe-${VERSION}.src.tar.xz
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-${VERSION}/libcxx-${VERSION}.src.tar.xz
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-${VERSION}/libcxxabi-${VERSION}.src.tar.xz
tar xf llvm-${VERSION}.src.tar.xz
tar xf cfe-${VERSION}.src.tar.xz
tar xf libcxx-${VERSION}.src.tar.xz
tar xf libcxxabi-${VERSION}.src.tar.xz
mv cfe-${VERSION}.src llvm-${VERSION}.src/projects
mv libcxx-${VERSION}.src llvm-${VERSION}.src/projects
mv libcxxabi-${VERSION}.src llvm-${VERSION}.src/projects
mkdir build
cd build
cmake \
  -DLLVM_ENABLE_FFI=ON \
  -DCMAKE_BUILD_TYPE=Release \
  -DLLVM_ENABLE_RTTI=ON \
  -DLLVM_TARGETS_TO_BUILD="host" \
  -DBUILD_SHARED_LIBS=ON \
  ../llvm-${VERSION}.src
cmake --build .
cmake -DCMAKE_INSTALL_PREFIX=/some/where -P cmake_install.cmake
=== snap ===

Greetings,
Fabiano


More information about the llvm-dev mailing list