c_josie_overlay

rocm-comgr 10.1: drop removed clang driver Action class

comgr-unbundle-command.cpp fails to compile against clang 24:

  'OffloadUnbundlingJobClass' is not a member of 'clang::driver::Action'

clang's ActionClass enum no longer has an unbundling job class. Return a
value above the clang job classes (as SPIRVCommand already does) so the
cache's command class stays distinct. Verified: syntax check of the patched
file against clang 24 passes; all four comgr patches apply in order.

3e4e9d3af50ab97bcbe3bdcad10ef844f7e32eea
cjosie <administrator@josie-c.com> · 2026-10-14T22:00 · browse files at this commit

parents: 5612d94

diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-10.1-llvm-24-clang-api.patch b/dev-libs/rocm-comgr/files/rocm-comgr-10.1-llvm-24-clang-api.patch
new file mode 100644
index 0000000..8b6ec87
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-10.1-llvm-24-clang-api.patch
@@ -0,0 +1,18 @@
+clang's driver no longer has Action::OffloadUnbundlingJobClass (the unbundling
+action class was dropped upstream). Return a class above the clang job classes,
+as SPIRVCommand already does, so the cache's command class stays distinct.
+
+--- a/src/comgr-unbundle-command.cpp
++++ b/src/comgr-unbundle-command.cpp
+@@ -121,7 +121,10 @@
+ }
+ 
+ CachedCommandAdaptor::ActionClass UnbundleCommand::getClass() const {
+-  return clang::driver::Action::OffloadUnbundlingJobClass;
++  // clang's driver no longer has an OffloadUnbundlingJobClass action, so return
++  // a class above the clang job classes (as SPIRVCommand does) to keep the
++  // cache's command class distinct.
++  return clang::driver::Action::ActionClass::JobClassLast + 2;
+ }
+ 
+ void UnbundleCommand::addOptionsIdentifier(HashAlgorithm &H) const {
diff --git a/dev-libs/rocm-comgr/rocm-comgr-10.1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-10.1.ebuild
index 589b3ad..2f7adcf 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-10.1.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-10.1.ebuild
@@ -26,6 +26,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-6.4.1-extend-isa-compatibility-check.patch"
 	"${FILESDIR}/${PN}-7.2.0-llvm-22-compat.patch"
 	"${FILESDIR}/${PN}-10.1-llvm-24-amdgpu-api.patch"
+	"${FILESDIR}/${PN}-10.1-llvm-24-clang-api.patch"
 )
 
 RDEPEND="