[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 5 15:08:16 PDT 2023


jhuber6 added a comment.

In D149978#4323328 <https://reviews.llvm.org/D149978#4323328>, @tra wrote:

>> The latter is a little difficult,
>
> The more we dig, the more we want GPU-capable lld. :-)

My thoughts exactly. I had a small chat with @MaskRay about how difficult it would be to spin up support for NVPTX. But it would probably be a reasonably large project, and considering who I work for would be difficult for me to do it as more than a hobby.



================
Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:641
+      // by nvlink.
+      if (llvm::any_of(II.getInputArg().getValues(), [](StringRef Arg) {
+            return Arg.equals("--color-diagnostics");
----------------
tra wrote:
> Can there ever be more than one value returned by `II.getInputArg().getValues()`?
> 
> If so, we probably don't want to skip all of them if one of them is `--color-diagnostics`. We may want to ignore only singleton `--color-diagnostics` and let all other combinations error out.
Yeah, you can do `-Wl,arg1,arg2,arg3`. This was just because I couldn't think of an easy way to separate them out, considering that we rely on `renderAsInput` we'd need to create an entirely new arg. Which is doable, but I wasn't sure if it was worth the effort.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149978/new/

https://reviews.llvm.org/D149978



More information about the cfe-commits mailing list