[PATCH] D114601: Read path to CUDA from env. variable CUDA_PATH on Windows
Mojca Miklavec via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 25 08:25:14 PST 2021
mojca updated this revision to Diff 389808.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114601/new/
https://reviews.llvm.org/D114601
Files:
clang/lib/Driver/ToolChains/Cuda.cpp
Index: clang/lib/Driver/ToolChains/Cuda.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Cuda.cpp
+++ clang/lib/Driver/ToolChains/Cuda.cpp
@@ -135,10 +135,7 @@
Candidates.emplace_back(
Args.getLastArgValue(clang::driver::options::OPT_cuda_path_EQ).str());
} else if (HostTriple.isOSWindows()) {
- for (const char *Ver : Versions)
- Candidates.emplace_back(
- D.SysRoot + "/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v" +
- Ver);
+ Candidates.emplace_back(llvm::sys::Process::GetEnv("CUDA_PATH"));
} else {
if (!Args.hasArg(clang::driver::options::OPT_cuda_path_ignore_env)) {
// Try to find ptxas binary. If the executable is located in a directory
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114601.389808.patch
Type: text/x-patch
Size: 770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211125/e2d09de9/attachment-0001.bin>
More information about the cfe-commits
mailing list