================ @@ -6867,8 +6867,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-nogpulib"); if (Arg *A = Args.getLastArg(options::OPT_fcf_protection_EQ)) { - CmdArgs.push_back( - Args.MakeArgString(Twine("-fcf-protection=") + A->getValue())); + // Do not pass this argument to the offloading device if the target does not + // support it. + // TODO: We need a better way to detect incompatible options for offloading. + if (JA.getOffloadingDeviceKind() == Action::OFK_None || + (!TC.getTriple().isAMDGPU() && !TC.getTriple().isNVPTX() && + !TC.getTriple().isSPIRV())) ---------------- Artem-B wrote:
+1. We have grown too many offloading cases all over the place over time. It was fine when there was only CUDA/NVPTX, was sort of OK when AMDGPU got added, now it gets to be a bit too much. https://github.com/llvm/llvm-project/pull/88402 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits