summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorArtem Belevich <tra@google.com>2015-11-17 22:28:55 +0000
committerArtem Belevich <tra@google.com>2015-11-17 22:28:55 +0000
commit8601733c1cec09bbda859129eb00a560dca034bb (patch)
treee06469532f1c3f3bdaec5e5e99abdef7801446bf /clang/lib/Driver/Tools.cpp
parentc29db84419592e98e71a08d1a9fb04a3d6b51a0c (diff)
downloadbcm5719-llvm-8601733c1cec09bbda859129eb00a560dca034bb.tar.gz
bcm5719-llvm-8601733c1cec09bbda859129eb00a560dca034bb.zip
[CUDA] Make CUDA compilation usable by default.
Currently clang requires several additional command line options in order to enable new features needed during CUDA compilation. This patch makes these options default. * Automatically include cuda_runtime.h if we've found a valid CUDA installation. * Disable automatic CUDA header inclusion during unit tests. * Added test case for command line construction. * Enabled target overloads and relaxed call checks that are needed in order to include CUDA headers. * Added CUDA-7.5 installation path to the CUDA installation search list. * Define __CUDA__ macro to indicate CUDA compilation. llvm-svn: 253389
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 5df8efafd5a..ab85d0f65e6 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -3292,6 +3292,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
assert(AuxToolChain != nullptr && "No aux toolchain.");
CmdArgs.push_back("-aux-triple");
CmdArgs.push_back(Args.MakeArgString(AuxToolChain->getTriple().str()));
+ CmdArgs.push_back("-fcuda-target-overloads");
+ CmdArgs.push_back("-fcuda-disable-target-call-checks");
}
if (Triple.isOSWindows() && (Triple.getArch() == llvm::Triple::arm ||
OpenPOWER on IntegriCloud