[clang] [flang] [Flang-new][OpenMP] Add offload related flags for AMDGPU (PR #96742)
Andrzej WarzyĆski via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 27 03:27:36 PDT 2024
================
@@ -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);
----------------
banach-space wrote:
> Clang does not verify how we use these flags and it accepts them for non-GPU target.
It's OK to make Flang "stricter" if we believe that's the right thing to do ;-) (I think that generating useful error/warning messages like "don't mix these flags - that's not supporter" would be a good thing)
> IMO can be reused between Flang and Clang
Are there any plans to extract that logic and share it somewhere?
> I don't know if Nvidia also want to reuse their toolchain between Clang and Flang to fully support OpenMP offloading.
Who could be the right person to ask?
https://github.com/llvm/llvm-project/pull/96742
More information about the cfe-commits
mailing list