================
@@ -333,6 +333,9 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args,
StringRef Val = A->getValue();
CmdArgs.push_back(Args.MakeArgString("-mcode-object-version=" + Val));
}
+
+ const ToolChain &TC = getToolChain();
+ TC.addClangTargetOptions(Args, CmdArgs, Action::OffloadKind::OFK_OpenMP);
----------------
DominikAdamski wrote:
No. My change does not imply any changes for Nvidia GPUs support.
Flang and Clang share the same LLVM backend which consumes generated LLVM IR.
For AMD GPU we need to embed bitcode definitions of GPU math functions. AMD
toolchain adds all required options to the compiler invocation for AMD GPU and
IMO can be reused between Flang and Clang.
I don't know if Nvidia also want to reuse their toolchain between Clang and
Flang to fully support OpenMP offloading.
https://github.com/llvm/llvm-project/pull/96742
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits