================ @@ -498,12 +498,16 @@ Expected<StringRef> clang(ArrayRef<StringRef> InputFiles, const ArgList &Args) { }; // Forward all of the `--offload-opt` and similar options to the device. - CmdArgs.push_back("-flto"); for (auto &Arg : Args.filtered(OPT_offload_opt_eq_minus, OPT_mllvm)) CmdArgs.append( {"-Xlinker", Args.MakeArgString("--plugin-opt=" + StringRef(Arg->getValue()))}); + if (Triple.isNVPTX() || Triple.isAMDGPU()) + CmdArgs.push_back("-foffload-lto"); + else + CmdArgs.push_back("-flto"); ---------------- jhuber6 wrote:
If you go to `trunk` it works, the error is now failing to find `ptxas` because it's not in Godbolt's path. That's only called following a successful run of the LTO pipeline https://godbolt.org/z/K493KvYaa. So, your `clang` is just old and this isn't a bug. https://github.com/llvm/llvm-project/pull/125243 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits