[clang] [Clang] Fix new driver device only compilation for `amdgcnspirv` target (PR #150110)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 22 17:19:08 PDT 2025


================
@@ -4886,6 +4886,10 @@ Action *Driver::BuildOffloadingActions(Compilation &C,
     // individually.
     for (Action *&A : DeviceActions) {
       if ((A->getType() != types::TY_Object &&
+           !(A->getOffloadingToolChain() &&
+             A->getOffloadingToolChain()->getTriple().getOS() ==
+                 llvm::Triple::OSType::AMDHSA &&
+             A->getOffloadingToolChain()->getTriple().isSPIRV()) &&
----------------
arsenm wrote:

demorgan condition and/or extract this into some kind of named predicate with a comment 

https://github.com/llvm/llvm-project/pull/150110


More information about the cfe-commits mailing list