[PATCH] D40453: Add the nvidia-cuda-toolkit Debian package path to search path

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 29 07:03:54 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rC319317: Add the nvidia-cuda-toolkit  Debian package path to search path (authored by sylvestre).

Repository:
  rC Clang

https://reviews.llvm.org/D40453

Files:
  lib/Driver/ToolChains/Cuda.cpp


Index: lib/Driver/ToolChains/Cuda.cpp
===================================================================
--- lib/Driver/ToolChains/Cuda.cpp
+++ lib/Driver/ToolChains/Cuda.cpp
@@ -75,6 +75,11 @@
     CudaPathCandidates.push_back(D.SysRoot + "/usr/local/cuda");
     for (const char *Ver : Versions)
       CudaPathCandidates.push_back(D.SysRoot + "/usr/local/cuda-" + Ver);
+
+    if (Distro(D.getVFS).IsDebian())
+      // Special case for Debian to have nvidia-cuda-toolkit work
+      // out of the box. More info on http://bugs.debian.org/882505
+      CudaPathCandidates.push_back(D.SysRoot + "/usr/lib/cuda");
   }
 
   for (const auto &CudaPath : CudaPathCandidates) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40453.124744.patch
Type: text/x-patch
Size: 676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171129/49dc60a9/attachment.bin>


More information about the cfe-commits mailing list