[PATCH] D40453: Add the nvidia-cuda-toolkit Debian package path to search path
Sylvestre Ledru via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 28 13:30:33 PST 2017
sylvestre.ledru updated this revision to Diff 124629.
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
@@ -63,6 +63,8 @@
// In decreasing order so we prefer newer versions to older versions.
std::initializer_list<const char *> Versions = {"8.0", "7.5", "7.0"};
+ Distro Distro(D.getVFS());
+
if (Args.hasArg(clang::driver::options::OPT_cuda_path_EQ)) {
CudaPathCandidates.push_back(
Args.getLastArgValue(clang::driver::options::OPT_cuda_path_EQ));
@@ -75,6 +77,9 @@
CudaPathCandidates.push_back(D.SysRoot + "/usr/local/cuda");
for (const char *Ver : Versions)
CudaPathCandidates.push_back(D.SysRoot + "/usr/local/cuda-" + Ver);
+
+ if (Distro.IsDebian())
+ CudaPathCandidates.push_back(D.SysRoot + "/usr/lib/cuda");
}
for (const auto &CudaPath : CudaPathCandidates) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40453.124629.patch
Type: text/x-patch
Size: 900 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171128/60817304/attachment.bin>
More information about the cfe-commits
mailing list