From Gentoo Wiki
Jump to: navigation, search

The LLVM packages use multilib support for two goals. The toolchain packages use multilib support to provide dependency libraries for multilib packages — support for all multilib targets matching LLVM_TARGET is enabled unconditionally, e.g. X86 backend can always emit 32-bit, 64-bit and x32 code. The runtime packages use multilib support to provide multilib-capable compiler runtime.

For example, to build 32-bit packages on amd64, you do not need abi_x86_32 on toolchain packages (LLVM and clang). However, you either need multilib-enabled GCC or abi_x86_32 on appropriate runtime packages.

Multilib dependencies on LLVM

As explained above, multilib dependency on toolchain packages should be only used when non-native libraries are used.

In the 3.9 branch, some of the runtime packages additionally depended on multilib sys-devel/llvm to provide CMake files needed for their build. However, in 4.0.0 the upstream build system has been fixed to support using the CMake files from the native install, and therefore the dependencies are no longer necessary.

Multilib support in LLVM packages

Package Multilib Notes
Toolchain packages
sys-devel/llvm Yes needed for media-libs/mesa
sys-devel/clang Yes needed for media-libs/mesa
dev-util/lldb No
sys-devel/lld No
Auxiliary packages
dev-ml/llvm-ocaml No
dev-python/clang-python No
dev-python/lit n/a
sys-devel/clang-common n/a
sys-devel/llvm-common n/a
sys-devel/llvmgold n/a
Runtime packages
sys-devel/clang-runtime Yes
sys-libs/compiler-rt Implicit the build system selects targets implicitly
sys-libs/compiler-rt-sanitizers implicit the build system selects targets implicitly
sys-libs/libcxx Yes
sys-libs/libcxxabi Yes
sys-libs/libomp Yes
sys-libs/llvm-libunwind Yes