[PATCH] D28320: [Driver] Driver changes to support CUDA compilation on Windows.

Justin Lebar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 4 13:57:03 PST 2017


jlebar created this revision.
jlebar added a reviewer: tra.
jlebar added a subscriber: cfe-commits.

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: https://reviews.llvm.org/D28319


https://reviews.llvm.org/D28320

Files:
  clang/include/clang/Driver/ToolChain.h
  clang/lib/Driver/MSVCToolChain.cpp
  clang/lib/Driver/MinGWToolChain.cpp
  clang/lib/Driver/ToolChains.cpp
  clang/lib/Driver/ToolChains.h
  clang/lib/Driver/Tools.cpp
  clang/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin/.keep
  clang/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include/.keep
  clang/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/.keep
  clang/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/libdevice/libdevice.compute_30.10.bc
  clang/test/Driver/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/nvvm/libdevice/libdevice.compute_35.10.bc
  clang/test/Driver/cuda-windows.cu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28320.83127.patch
Type: text/x-patch
Size: 10179 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170104/95a181e2/attachment-0001.bin>


More information about the cfe-commits mailing list