[PATCH] D111488: [Clang][clang-nvlink-wrapper] Pass nvlink path to the wrapper

Michael Kruse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 11 10:25:28 PDT 2021


Meinersbur accepted this revision.
Meinersbur added a comment.
This revision is now accepted and ready to land.

Some nitpicks, but it fixes the build, so LGTM.



================
Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:617
+  // Find nvlink and pass it as "--nvlink-command=" argument of clang-nvlink-wrapper.
+  auto NvlinkBin = getToolChain().GetProgramPath("nvlink");
+  const char *NvlinkPath =
----------------
[style] [[ https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable | LLVM's coding standard does not use almost-always-auto ]].

It's not immediately obvious here, does `GetProgramPath` look into the BinPath detected by CudaInstallationDetector? I applied the patch locally to http://meinersbur.de:8011/#/builders/1 and it actually does work.


================
Comment at: clang/tools/clang-nvlink-wrapper/ClangNvlinkWrapper.cpp:169-170
 
-  for (size_t i = 1; i < Argv.size(); ++i) {
-    std::string Arg = Argv[i];
+  for (size_t i = 0; i < NVArgs.size(); ++i) {
+    std::string Arg = NVArgs[i];
     if (sys::path::extension(Arg) == ".a") {
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111488



More information about the cfe-commits mailing list