Project:LLVM/Split packages

From Gentoo Wiki
Jump to: navigation, search

Starting with LLVM 4.0.0, various LLVM projects are available as separate packages again.

Why split?

LLVM is commonly built as a single big CMake tree with the top-level (LLVM) CMake scripting finds tools in subdirectories and builds them. However, in 4.0.0 the upstream build systems were fixed to the point where building tools separately became possible.

Split builds mean that instead of one big package with multiple USE flags, we have multiple packages that can be built separately. This has a number of advantages:

  • It is possible to install/remove additional LLVM projects without rebuilding the remaining ones. For example, if you want to try LLDB, you don't have to rebuild LLVM and clang.
  • The build trees are smaller, and builds of single packages are shorter. As a result, building LLVM takes less space and retrying on failures is easier.
  • The test suites are run separately, so a test failure in one package does not cover the result from another.
  • It is cleaner as to which components USE flags apply, and e.g. which projects are multilib.
  • The ebuilds become simpler, e.g. because there is no need to apply multilib logic with a lot of conditionals for non-multilib parts.

Split package list

Upstream repo Package Description
llvm dev-ml/llvm-ocaml OCaml bindings for LLVM
dev-python/lit lit test suite runner, installed as Python module + script
sys-devel/llvm core libraries and tools
sys-devel/llvm-common common files shared between multiple slots of LLVM
- sys-devel/llvmgold symlink for binutils ar & nm LLVM IR objects support
clang dev-python/clang-python Python bindings for clang
sys-devel/clang-common common files shared between multiple slots of Clang
sys-devel/clang core clang libraries and the compiler toolkit
clang-tools-extra additional clang tools (probably not worth splitting due to small size)
- sys-devel/clang-runtime metapackage to pull in necessary runtimes
compiler-rt sys-libs/compiler-rt builtins library of compiler-rt
sys-libs/compiler-rt-sanitizers sanitizer & xray libraries and tools of compiler-rt
libclc dev-libs/libclc OpenCL runtime library
libcxx sys-libs/libcxx C++ runtime library
libcxxabi sys-libs/libcxxabi Standard ABI library for libc++ (alternatively sys-libs/libcxxrt can be used)
libunwind sys-libs/llvm-libunwind Simple unwinder implementation (alternatively sys-libs/libunwind can be used, or libgcc)
lld sys-devel/lld Link editor
lldb dev-util/lldb Debugger
openmp sys-libs/libomp OpenMP runtime