[clang] [LinkerWrapper] Clean up options after proper forwarding (PR #126297)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 7 11:57:01 PST 2025


================
@@ -9223,6 +9223,8 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA,
       Args.MakeArgString("--host-triple=" + getToolChain().getTripleString()));
   if (Args.hasArg(options::OPT_v))
     CmdArgs.push_back("--wrapper-verbose");
+  if (Arg *A = Args.getLastArg(options::OPT_cuda_path_EQ))
----------------
jhuber6 wrote:

It's needed internally to find `fatbinary` the one above passes it to the internal `clang` job which then needs to find `ptxas` and `nvlink`. So, we either pass it twice here or do it in the linker wrapper, I prefer here because it's automatic via the forwarding for the first part.

https://github.com/llvm/llvm-project/pull/126297


More information about the cfe-commits mailing list