update-cuda-search-path
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Tue, 13 Feb 2018 08:26:55 +0000 (08:26 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Tue, 13 Feb 2018 08:26:55 +0000 (08:26 +0000)
 let clang try that path by default, too, s.t. an explicit --cuda-path is
 not needed for the nvidia-cuda-toolkit/non-free packages

 try the new path *after* the default paths /usr/local/cuda{,-X.Y}
 to not interfere with cuda installations from nvidia's installer

Gbp-Pq: Name update-cuda-search-path.patch

clang/lib/Driver/ToolChains.cpp

index 189670ee5afb88c0fb91fa89981581749b091a38..5e1ddc349d100509812f415e861597068977457c 100644 (file)
@@ -1825,6 +1825,7 @@ CudaInstallationDetector::CudaInstallationDetector(
     CudaPathCandidates.push_back(D.SysRoot + "/usr/local/cuda");
     for (const char *Ver : Versions)
       CudaPathCandidates.push_back(D.SysRoot + "/usr/local/cuda-" + Ver);
+    CudaPathCandidates.push_back(D.SysRoot + "/usr/lib/cuda");
   }
 
   for (const auto &CudaPath : CudaPathCandidates) {