================ @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits