[PATCH] D52259: [CUDA] Rearrange search path ordering to fix two test case failures
Jiading Gai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 19 17:52:55 PDT 2018
gaijiading updated this revision to Diff 166206.
gaijiading added a comment.
Apologies for having uploaded the wrong patch in my original review request. Please help review this version instead. Thanks.
Repository:
rC Clang
https://reviews.llvm.org/D52259
Files:
lib/Driver/ToolChains/Cuda.cpp
Index: lib/Driver/ToolChains/Cuda.cpp
===================================================================
--- lib/Driver/ToolChains/Cuda.cpp
+++ lib/Driver/ToolChains/Cuda.cpp
@@ -87,6 +87,10 @@
D.SysRoot + "/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v" +
Ver);
} else {
+ Candidates.emplace_back(D.SysRoot + "/usr/local/cuda");
+ for (const char *Ver : Versions)
+ Candidates.emplace_back(D.SysRoot + "/usr/local/cuda-" + Ver);
+
if (!Args.hasArg(clang::driver::options::OPT_cuda_path_ignore_env)) {
// Try to find ptxas binary. If the executable is located in a directory
// called 'bin/', its parent directory might be a good guess for a valid
@@ -108,10 +112,6 @@
}
}
- Candidates.emplace_back(D.SysRoot + "/usr/local/cuda");
- for (const char *Ver : Versions)
- Candidates.emplace_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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52259.166206.patch
Type: text/x-patch
Size: 1094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180920/a5e95852/attachment.bin>
More information about the cfe-commits
mailing list