================
@@ -4945,12 +4959,15 @@ Action *Driver::BuildOffloadingActions(Compilation &C,
       }
     }
 
-    // Compiling HIP in non-RDC mode requires linking each action individually.
+    // Compiling HIP in device-only non-RDC mode requires linking each action
+    // individually.
     for (Action *&A : DeviceActions) {
       if ((A->getType() != types::TY_Object &&
            A->getType() != types::TY_LTO_BC) ||
           Kind != Action::OFK_HIP ||
-          Args.hasFlag(options::OPT_fgpu_rdc, options::OPT_fno_gpu_rdc, false))
+          Args.hasFlag(options::OPT_fgpu_rdc, options::OPT_fno_gpu_rdc,
+                       false) ||
+          !offloadDeviceOnly())
----------------
yxsamliu wrote:

For HIP no-rdc device-only compilation, the existing HIP apps expect the output 
to be bundled or unbundled code objects so that they can be loaded directly 
without JIT at run time. We could use linker wrapper to generate them without 
wrapping them in a host object, but that would be a separate patch.

https://github.com/llvm/llvm-project/pull/132869
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to