[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 15 13:22:34 PST 2022


tra added a comment.

LGTM overall.

So, essentially the patch refactors what we've already been doing for OpenMP and made it usable manually, which will be useful for things like GPU-side libc tests.



================
Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:631-632
+
+  const char *Exec =
+      Args.MakeArgString(getToolChain().GetProgramPath("nvlink"));
+  C.addCommand(std::make_unique<Command>(
----------------
Nit: I'd just do it within the `make_unique` below. It should end up on a line by itself and should not hurt readability.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140158



More information about the cfe-commits mailing list