Currently our jammy ci (jenkins) builders are only able to
(apt) install clang 14 as the latest version available.
Clang stable is already at 19 today (i.e we're 5 major releases behind).
Meaning, full support of C++20 and some bugs [1] requiring us to update
the compiler used for make check.
As updating to Ubuntu 24 is not feasable in the near future and
containerized builds is not yet merged - with this patch, we
would get clang-16 directly form llvm installation script.
Note: discover_compiler() would prefer clang-16 even if
clang-14 will be installed by apt in INSTALL_EXTRA_PACKAGES
defined below.
[1] https://github.com/llvm/llvm-project/issues/52696
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
local which_pkg="which"
if command -v apt-get > /dev/null 2>&1 ; then
which_pkg="debianutils"
+
+ if in_jenkins; then
+ if ! type clang-16 > /dev/null 2>&1 ; then
+ ci_debug "Getting clang-16"
+ wget https://apt.llvm.org/llvm.sh
+ chmod +x llvm.sh
+ $DRY_RUN sudo ./llvm.sh 16
+ rm llvm.sh
+ fi
+ fi
fi
if test -f ./install-deps.sh ; then