update-cuda-search-path
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Sat, 9 Dec 2017 18:56:52 +0000 (18:56 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Sat, 9 Dec 2017 18:56:52 +0000 (18:56 +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/Cuda.cpp

index 935a5a37ada523868d20a68608465723a2030e0b..d0e7fdd754dcde66e772d6f2a5788dcc9dbf7de9 100644 (file)
@@ -71,6 +71,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) {