]> granicus.if.org Git - clang/commit
[Driver] Driver changes to support CUDA compilation on Windows.
authorJustin Lebar <jlebar@google.com>
Thu, 5 Jan 2017 16:52:29 +0000 (16:52 +0000)
committerJustin Lebar <jlebar@google.com>
Thu, 5 Jan 2017 16:52:29 +0000 (16:52 +0000)
commitc04b67446e306a54ce9397292664ff6de9ef1087
tree11b0a75cf781f8a7a841749335065346b1a1d8e8
parentc3d7a361772efa7e70bc256740d0f637e07a4f49
[Driver] Driver changes to support CUDA compilation on Windows.

Summary:
For the most part this is straightforward: Just add a CudaInstallation
object to the MSVC and MinGW toolchains.

CudaToolChain has to override computeMSVCVersion so that
Clang::constructJob passes the right version flag to cc1.  We have to
modify IsWindowsMSVC and friends in Clang::constructJob to be true when
compiling CUDA device code on Windows for the same reason.

Depends on: D28319

Reviewers: tra

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D28320

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291131 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/clang/Driver/ToolChain.h
lib/Driver/MSVCToolChain.cpp
lib/Driver/MinGWToolChain.cpp
lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h
lib/Driver/Tools.cpp
test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin/.keep [new file with mode: 0644]
test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include/.keep [new file with mode: 0644]
test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/.keep [new file with mode: 0644]
test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/libdevice/libdevice.compute_30.10.bc [new file with mode: 0644]
test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/libdevice/libdevice.compute_35.10.bc [new file with mode: 0644]
test/Driver/cuda-windows.cu [new file with mode: 0644]