]> granicus.if.org Git - clang/commitdiff
Add the nvidia-cuda-toolkit Debian package path to search path
authorSylvestre Ledru <sylvestre@debian.org>
Wed, 29 Nov 2017 15:03:28 +0000 (15:03 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Wed, 29 Nov 2017 15:03:28 +0000 (15:03 +0000)
Summary:
Reported here:
http://bugs.debian.org/882505

Patch by Andreas Beckmann

Reviewers: Hahnfeld, tra

Reviewed By: tra

Subscribers: jlebar, cfe-commits

Differential Revision: https://reviews.llvm.org/D40453

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319317 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/Cuda.cpp

index 4a5cf3dc6aec4a334ef0990b884c0352ef2ad368..aea409fc20929382df733a923ce1bffeee8495f5 100644 (file)
@@ -75,6 +75,11 @@ CudaInstallationDetector::CudaInstallationDetector(
     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) {