From: Sylvestre Ledru Date: Wed, 29 Nov 2017 15:03:28 +0000 (+0000) Subject: Add the nvidia-cuda-toolkit Debian package path to search path X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6acd80a4a900e400e34ac6f57ce2b2d4914223a8;p=clang Add the nvidia-cuda-toolkit Debian package path to search path 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 --- diff --git a/lib/Driver/ToolChains/Cuda.cpp b/lib/Driver/ToolChains/Cuda.cpp index 4a5cf3dc6a..aea409fc20 100644 --- a/lib/Driver/ToolChains/Cuda.cpp +++ b/lib/Driver/ToolChains/Cuda.cpp @@ -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) {