]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
src/script/run-make.sh: clang 14->16
authorMatan Breizman <mbreizma@redhat.com>
Mon, 10 Feb 2025 11:12:19 +0000 (11:12 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 20 Feb 2025 14:17:55 +0000 (14:17 +0000)
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>
src/script/run-make.sh

index 23724028fe66b6451b67d332c1f6000dac7e9556..48ed9b39d731f0df358a485ce8f16be905985e49 100755 (executable)
@@ -52,6 +52,16 @@ function prepare() {
     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