Starting with 4.0.0, the LLVM packages are once more slotted. This means it is now possible to have multiple versions of LLVM/clang installed simultaneously.
Slotting serves three goals:
- Making it possible to upgrade split clang package without intermediate breakage. In particular, when upgrading from clang-X to clang-Y, the package manager must not uninstall llvm-X before clang-Y is installed.
- Making it possible to use multiple versions of clang simultaneously, e.g. to test your programs against multiple versions of the compiler.
- Making it possible to at least partially upgrade to a newer version of LLVM before all software supports it. Previously, a single package not supporting a newer LLVM version prevented the system from upgrading to a newer one.
Which packages are slotted?
There are degrees of slotting applied to various LLVM packages:
- packages that are not slotted -- only one version can be installed,
- packages that are slotted by major version -- one release of every major version can be installed (i.e. LLVM x),
- packages that are slotted by full version -- one revision of every full version can be installed (i.e. LLVM x.y.z).
The use of slotting is summarized in the table following.
|Package||Slotting||Dep type||Required LLVM version||Notes|
|sys-devel/clang||by major||revdep of LLVM||exact match|
|dev-util/lldb||no||revdep of LLVM+clang||exact match|
|sys-devel/lld||no||revdep of LLVM||exact match|
|dev-ml/llvm-ocaml||no||revdep of LLVM||exact match|
|dev-python/clang-python||no||revdep of clang||any?||dlopen()s clang libraries without SONAME, probably dangerous|
|dev-python/lit||no||dep of most pkgs||exact match||required for tests only, can cause conflict when trying to install multiple LLVM versions simultaneously|
|sys-devel/clang-common||no||dep of clang||any|
|sys-devel/llvm-common||no||dep of LLVM||any|
|sys-devel/llvmgold||no||circ pdep of LLVM||any||just a symlink to the newest version for binutils' ar & nm|
|sys-devel/clang-runtime||by fullver||pdep of LLVM||exact match|
|sys-libs/compiler-rt||by fullver||dep of clang-runtime||exact match||strictly speaking, does not require exact match to clang version but needs to be installed in path containing fullver|
|sys-libs/libcxx||no||dep of clang-runtime||any|
|sys-libs/libcxxabi||no||dep of clang-runtime||any|
|sys-libs/libomp||no||dep of clang-runtime||any|
|sys-libs/llvm-libunwind||no||dep of clang-runtime||any|