[clang] [llvm] [Offload][Driver] Split frontend CUDA/HIP language assumptions from backend device (PR #212373)

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 14:14:21 PDT 2026


================
@@ -723,7 +727,11 @@ AMDGPUToolChain::AMDGPUToolChain(const Driver &D, const llvm::Triple &Triple,
     : Generic_ELF(D, Triple, Args),
       OptionsDefault(
           {{options::OPT_O, "3"}, {options::OPT_cl_std_EQ, "CL1.2"}}),
-      HostTC(HostTC_), UseHIPLinker(Kind == Action::OFK_HIP),
+      HostTC(HostTC_),
+      UseHIPLinker(Kind == Action::OFK_HIP ||
+                   (Kind == Action::OFK_Cuda &&
+                    Args.hasFlag(options::OPT_foffload_via_llvm,
+                                 options::OPT_fno_offload_via_llvm, false))),
----------------
jdoerfert wrote:

Can you check we need this change?

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


More information about the llvm-commits mailing list