Skip to contentSkip to conversation

Restrict Clang/LLVM supported versions

PATCH In review Roger Pau Monne 4 participants 12 messages Feb 29, 2024 – Mar 12, 2024

lore
Share & tools
lore
#0 lore raw

cover Restrict Clang/LLVM supported versions

Hello,

The following series limits the supported versions of Clang to what I actually care about, as I seem to be the only one that actively uses Clang/LLVM builds of Xen.

Patch 2 adds non-debug tests for -clang builds.

Thanks, Roger.

Roger Pau Monne (2):
README: bump minimum required clang/llvm version
automation: introduce non debug clang based tests

 README                          |  2 +-
 automation/gitlab-ci/build.yaml | 45 ---------------------------------
 automation/gitlab-ci/test.yaml  | 18 +++++++++++--
 3 files changed, 17 insertions(+), 48 deletions(-)
Signature · 1 line
2.44.0
#1 lore raw

PATCH 1/2 README: bump minimum required clang/llvm version

We no longer have a way to build with the minimum required clang/llvm version stated in the README on the gitlab CI loop, since we dropped the Debian Jessie container that had Clang 3.5.0.

Bump the minimum required Clang/LLVM to the one used in the oldest production FreeBSD version (13.2 currently), as that's the main reason I care to maintain Clang/LLVM support, and as far as I know FreeBSD is the only production deployment of Xen built with Clang/LLVM.

Purge the build jobs for non-supported Clang versions from Gitlab CI. Note the .dockerfiles for the respective distros are explicitly not adjusted to drop the install of the clang packages, or else those jobs would start to fail on older Xen branches.

---
I'm willing to consider older versions, but there needs to be a reason (iow:
use-case) for considering those, as maintaining support for older toolchains is a burden.

---
 README                          |  2 +-
 automation/gitlab-ci/build.yaml | 45 ---------------------------------
 2 files changed, 1 insertion(+), 46 deletions(-)
README +1 -1
index c8a108449e29..5fe52cc7a932 100644
@@ -41,7 +41,7 @@ provided by your OS distributor:
         - GCC 4.1.2_20070115 or later
         - GNU Binutils 2.16.91.0.5 or later
         or
-        - Clang/LLVM 3.5 or later
+        - Clang/LLVM 14.0.0 or later
       - For ARM 32-bit:
         - GCC 4.9 or later
         - GNU Binutils 2.24 or later
automation/gitlab-ci/build.yaml +0 -45

69 lines not on this page · raw message

Signature · 1 line
2.44.0
#2 lore raw

Re: [PATCH 1/2] README: bump minimum required clang/llvm version

README provided by your OS distributor: · line 44

Quoted 8 lines · Roger Pau Monne
README +1 -1
@@ -41,7 +41,7 @@ provided by your OS distributor:
         - GCC 4.1.2_20070115 or later
         - GNU Binutils 2.16.91.0.5 or later
         or
-        - Clang/LLVM 3.5 or later
+        - Clang/LLVM 14.0.0 or later

Wow, that's a big step. I'm build-testing with Clang7 on one system and with Clang5 on another (and the latter more frequently than the former). If any real dependency on this new a version (about 3 years old?) was introduced, I would then no longer be able to locally test any Clang builds (and hence the risk would again increase that I introduce issues that affect just Clang builds).

Jan

#3 lore raw

Re: [PATCH 1/2] README: bump minimum required clang/llvm version

Quoted 16 lines · Jan Beulich

README provided by your OS distributor: · line 44

Quoted 8 lines · Roger Pau Monne
README +1 -1
@@ -41,7 +41,7 @@ provided by your OS distributor:
         - GCC 4.1.2_20070115 or later
         - GNU Binutils 2.16.91.0.5 or later
         or
-        - Clang/LLVM 3.5 or later
+        - Clang/LLVM 14.0.0 or later

Wow, that's a big step. I'm build-testing with Clang7 on one system and with Clang5 on another (and the latter more frequently than the former). If any real dependency on this new a version (about 3 years old?) was introduced, I would then no longer be able to locally test any Clang builds (and hence the risk would again increase that I introduce issues that affect just Clang builds).

Would it be possible for you to update to a newer version? I see both the OpenSUSE containers in Gitlab have newer versions of Clang.

The reasoning for selecting such versions is in the commit message, I simply see no point in maintaining support for older Clang versions if there's no-one that actually runs such builds. Just listing them as supported for being able to output a binary that's never run tested is not helpful.

Thanks, Roger.

#4 lore raw

Re: [PATCH 1/2] README: bump minimum required clang/llvm version

Quoted 18 lines · Roger Pau Monné
Quoted 16 lines · Jan Beulich

README provided by your OS distributor: · line 44

Quoted 8 lines · Roger Pau Monne
README +1 -1
@@ -41,7 +41,7 @@ provided by your OS distributor:
         - GCC 4.1.2_20070115 or later
         - GNU Binutils 2.16.91.0.5 or later
         or
-        - Clang/LLVM 3.5 or later
+        - Clang/LLVM 14.0.0 or later

Wow, that's a big step. I'm build-testing with Clang7 on one system and with Clang5 on another (and the latter more frequently than the former). If any real dependency on this new a version (about 3 years old?) was introduced, I would then no longer be able to locally test any Clang builds (and hence the risk would again increase that I introduce issues that affect just Clang builds).

Quoted 2 lines

Would it be possible for you to update to a newer version? I see both the OpenSUSE containers in Gitlab have newer versions of Clang.

No. These are SLES versions which I'm not intending to touch. See

https://lists.xen.org/archives/html/xen-devel/2024-02/msg01793.html

and

https://lists.xen.org/archives/html/xen-devel/2024-02/msg01795.html

for why. The most recent piece of hardware I've installed a fresh (but not exactly new, yet still fully supported) SLES version on would apparently offer Clang7 only, either.

If anything I could see about building a newer Clang version myself; no idea how involved that is compared to the building of gcc (which I consider pretty straightforward, but that's biased by me being used to doing so).

Jan

#5 lore raw

Re: [PATCH 1/2] README: bump minimum required clang/llvm version

Quoted 26 lines · Jan Beulich
Quoted 18 lines · Roger Pau Monné
Quoted 16 lines · Jan Beulich

README provided by your OS distributor: · line 44

Quoted 8 lines · Roger Pau Monne
README +1 -1
@@ -41,7 +41,7 @@ provided by your OS distributor:
         - GCC 4.1.2_20070115 or later
         - GNU Binutils 2.16.91.0.5 or later
         or
-        - Clang/LLVM 3.5 or later
+        - Clang/LLVM 14.0.0 or later

Wow, that's a big step. I'm build-testing with Clang7 on one system and with Clang5 on another (and the latter more frequently than the former). If any real dependency on this new a version (about 3 years old?) was introduced, I would then no longer be able to locally test any Clang builds (and hence the risk would again increase that I introduce issues that affect just Clang builds).

Quoted 2 lines

Would it be possible for you to update to a newer version? I see both the OpenSUSE containers in Gitlab have newer versions of Clang.

No. These are SLES versions which I'm not intending to touch. See

https://lists.xen.org/archives/html/xen-devel/2024-02/msg01793.html

Quoted 7 lines

and

https://lists.xen.org/archives/html/xen-devel/2024-02/msg01795.html

for why. The most recent piece of hardware I've installed a fresh (but not exactly new, yet still fully supported) SLES version on would apparently offer Clang7 only, either.

Bah, that's not even Clang, only LLVM.

Jan

#6 lore raw

Re: [PATCH 1/2] README: bump minimum required clang/llvm version

Quoted 27 lines · Jan Beulich
Quoted 26 lines · Jan Beulich
Quoted 18 lines · Roger Pau Monné
Quoted 16 lines · Jan Beulich

README provided by your OS distributor: · line 44

Quoted 8 lines · Roger Pau Monne
README +1 -1
@@ -41,7 +41,7 @@ provided by your OS distributor:
         - GCC 4.1.2_20070115 or later
         - GNU Binutils 2.16.91.0.5 or later
         or
-        - Clang/LLVM 3.5 or later
+        - Clang/LLVM 14.0.0 or later

Wow, that's a big step. I'm build-testing with Clang7 on one system and with Clang5 on another (and the latter more frequently than the former). If any real dependency on this new a version (about 3 years old?) was introduced, I would then no longer be able to locally test any Clang builds (and hence the risk would again increase that I introduce issues that affect just Clang builds).

Quoted 2 lines

Would it be possible for you to update to a newer version? I see both the OpenSUSE containers in Gitlab have newer versions of Clang.

No. These are SLES versions which I'm not intending to touch. See

https://lists.xen.org/archives/html/xen-devel/2024-02/msg01793.html

Quoted 7 lines
Quoted 7 lines

and

https://lists.xen.org/archives/html/xen-devel/2024-02/msg01795.html

for why. The most recent piece of hardware I've installed a fresh (but not exactly new, yet still fully supported) SLES version on would apparently offer Clang7 only, either.

Hm, OK. Would containers be an option?

I don't know for gcc, but for clang I'm quite sure the only run time tested builds are the ones used by FreeBSD. I'm hesitant to claim clang versions as supported when they are only tested to generate an output without triggering any errors, but there's no testing at all that the generated code is functional.

Quoted 1 line

Bah, that's not even Clang, only LLVM.

I'm confused by this, doesn't your llvm package include clang?

Thanks, Roger.

#7 lore raw

Re: [PATCH 1/2] README: bump minimum required clang/llvm version

Quoted 4 lines · Roger Pau Monné
Quoted 1 line · Jan Beulich

Bah, that's not even Clang, only LLVM.

I'm confused by this, doesn't your llvm package include clang?

No, there are quite a few RPMs in general in SLES to cover everything, yet on the distro in question the clang* one(s) are (is) missing.

Jan

Acked-by on v1 1/2
#8 lore raw

Re: [PATCH 1/2] README: bump minimum required clang/llvm version

In reply to Roger Pau Monne

Hi Roger,

Quoted 14 lines · Roger Pau Monne

We no longer have a way to build with the minimum required clang/llvm version stated in the README on the gitlab CI loop, since we dropped the Debian Jessie container that had Clang 3.5.0.

Bump the minimum required Clang/LLVM to the one used in the oldest production FreeBSD version (13.2 currently), as that's the main reason I care to maintain Clang/LLVM support, and as far as I know FreeBSD is the only production deployment of Xen built with Clang/LLVM.

Purge the build jobs for non-supported Clang versions from Gitlab CI. Note the .dockerfiles for the respective distros are explicitly not adjusted to drop the install of the clang packages, or else those jobs would start to fail on older Xen branches.

Quoted 5 lines

---
I'm willing to consider older versions, but there needs to be a reason (iow:
use-case) for considering those, as maintaining support for older toolchains is a burden.

It makes sense. On another thread I mentioned that QEMU also took the approach to only support compilers from currently (security?) supported distros.

This could always be relaxed.

Cheers,

Signature · 1 line
Julien Grall
#9 lore raw

PATCH 2/2 automation: introduce non debug clang based tests

In reply to Roger Pau Monne

The generated code between the debug and release builds can be quite different, as a note 2ce562b2a413 only manifested in non-debug builds due to the usage of -O2.

Duplicate the clang based test in order to test with both debug and non-debug Xen builds.

---
 automation/gitlab-ci/test.yaml | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
automation/gitlab-ci/test.yaml +16 -2
index 8b7b2e4da92d..dedca794b257 100644
@@ -422,13 +422,20 @@ qemu-smoke-x86-64-gcc:
   needs:
     - debian-stretch-gcc-debug
 
-qemu-smoke-x86-64-clang:
+qemu-smoke-x86-64-clang-debug:
   extends: .qemu-x86-64
   script:
     - ./automation/scripts/qemu-smoke-x86-64.sh pv 2>&1 | tee ${LOGFILE}
   needs:
     - debian-bookworm-clang-debug
 
+qemu-smoke-x86-64-clang:
+  extends: .qemu-x86-64
+  script:
+    - ./automation/scripts/qemu-smoke-x86-64.sh pv 2>&1 | tee ${LOGFILE}
+  needs:
+    - debian-bookworm-clang
+
 qemu-smoke-x86-64-gcc-pvh:
   extends: .qemu-x86-64
   script:
@@ -436,13 +443,20 @@ qemu-smoke-x86-64-gcc-pvh:
   needs:
     - debian-stretch-gcc-debug
 
-qemu-smoke-x86-64-clang-pvh:
+qemu-smoke-x86-64-clang-debug-pvh:
   extends: .qemu-x86-64
   script:
     - ./automation/scripts/qemu-smoke-x86-64.sh pvh 2>&1 | tee ${LOGFILE}
   needs:
     - debian-bookworm-clang-debug
 
+qemu-smoke-x86-64-clang-pvh:
+  extends: .qemu-x86-64
+  script:
+    - ./automation/scripts/qemu-smoke-x86-64.sh pvh 2>&1 | tee ${LOGFILE}
+  needs:
+    - debian-bookworm-clang
+
 qemu-smoke-riscv64-gcc:
   extends: .qemu-riscv64
   script:
Signature · 1 line
2.44.0
#10 lore raw

Re: [PATCH 2/2] automation: introduce non debug clang based tests

FWIW, this is not tied to patch 1, so can go in independently. I think it's a worthwhile improvement.

Thanks, Roger.

Quoted 63 lines · Roger Pau Monne

The generated code between the debug and release builds can be quite different, as a note 2ce562b2a413 only manifested in non-debug builds due to the usage of -O2.

Duplicate the clang based test in order to test with both debug and non-debug Xen builds.

---
 automation/gitlab-ci/test.yaml | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
automation/gitlab-ci/test.yaml +16 -2
index 8b7b2e4da92d..dedca794b257 100644
@@ -422,13 +422,20 @@ qemu-smoke-x86-64-gcc:
   needs:
     - debian-stretch-gcc-debug
 
-qemu-smoke-x86-64-clang:
+qemu-smoke-x86-64-clang-debug:
   extends: .qemu-x86-64
   script:
     - ./automation/scripts/qemu-smoke-x86-64.sh pv 2>&1 | tee ${LOGFILE}
   needs:
     - debian-bookworm-clang-debug
 
+qemu-smoke-x86-64-clang:
+  extends: .qemu-x86-64
+  script:
+    - ./automation/scripts/qemu-smoke-x86-64.sh pv 2>&1 | tee ${LOGFILE}
+  needs:
+    - debian-bookworm-clang
+
 qemu-smoke-x86-64-gcc-pvh:
   extends: .qemu-x86-64
   script:
@@ -436,13 +443,20 @@ qemu-smoke-x86-64-gcc-pvh:
   needs:
     - debian-stretch-gcc-debug
 
-qemu-smoke-x86-64-clang-pvh:
+qemu-smoke-x86-64-clang-debug-pvh:
   extends: .qemu-x86-64
   script:
     - ./automation/scripts/qemu-smoke-x86-64.sh pvh 2>&1 | tee ${LOGFILE}
   needs:
     - debian-bookworm-clang-debug
 
+qemu-smoke-x86-64-clang-pvh:
+  extends: .qemu-x86-64
+  script:
+    - ./automation/scripts/qemu-smoke-x86-64.sh pvh 2>&1 | tee ${LOGFILE}
+  needs:
+    - debian-bookworm-clang
+
 qemu-smoke-riscv64-gcc:
   extends: .qemu-riscv64
   script:
Signature · 1 line
2.44.0
Reviewed-by on v1 2/2
#11 lore raw

Re: [PATCH 2/2] automation: introduce non debug clang based tests

In reply to Roger Pau Monne
Quoted 8 lines · Roger Pau Monne

The generated code between the debug and release builds can be quite different, as a note 2ce562b2a413 only manifested in non-debug builds due to the usage of -O2.

Duplicate the clang based test in order to test with both debug and non-debug Xen builds.