We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8734a3d commit 2f69e97Copy full SHA for 2f69e97
clang/lib/Driver/ToolChains/Cuda.cpp
@@ -136,6 +136,11 @@ CudaInstallationDetector::CudaInstallationDetector(
136
Candidates.emplace_back(
137
Args.getLastArgValue(clang::driver::options::OPT_cuda_path_EQ).str());
138
} else if (HostTriple.isOSWindows()) {
139
+ // CUDA_PATH is set by the installer, prefer it over other versions that
140
+ // might be present on the system.
141
+ if (const char *CudaPathEnvVar = ::getenv("CUDA_PATH"))
142
+ Candidates.emplace_back(CudaPathEnvVar);
143
+
144
for (const char *Ver : Versions)
145
146
D.SysRoot + "/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v" +
0 commit comments