aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Driver/ToolChains.cpp')
-rw-r--r--clang/lib/Driver/ToolChains.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index 531e790..78a611e 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -1629,6 +1629,7 @@ void Generic_GCC::CudaInstallationDetector::init(
Args.getLastArgValue(options::OPT_cuda_path_EQ));
else {
CudaPathCandidates.push_back(D.SysRoot + "/usr/local/cuda");
+ CudaPathCandidates.push_back(D.SysRoot + "/usr/local/cuda-7.5");
CudaPathCandidates.push_back(D.SysRoot + "/usr/local/cuda-7.0");
}
@@ -4134,8 +4135,11 @@ void Linux::AddCudaIncludeArgs(const ArgList &DriverArgs,
if (DriverArgs.hasArg(options::OPT_nocudainc))
return;
- if (CudaInstallation.isValid())
+ if (CudaInstallation.isValid()) {
addSystemInclude(DriverArgs, CC1Args, CudaInstallation.getIncludePath());
+ CC1Args.push_back("-include");
+ CC1Args.push_back("cuda_runtime.h");
+ }
}
bool Linux::isPIEDefault() const { return getSanitizerArgs().requiresPIE(); }