
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 llvm-svn: 291131
15 lines
622 B
Plaintext
15 lines
622 B
Plaintext
// REQUIRES: clang-driver
|
|
// REQUIRES: x86-registered-target
|
|
// REQUIRES: nvptx-registered-target
|
|
//
|
|
// RUN: %clang -v --target=i386-pc-windows-msvc \
|
|
// RUN: --sysroot=%S/Inputs/CUDA-windows 2>&1 %s -### | FileCheck %s
|
|
// RUN: %clang -v --target=i386-pc-windows-mingw32 \
|
|
// RUN: --sysroot=%S/Inputs/CUDA-windows 2>&1 %s -### | FileCheck %s
|
|
|
|
// CHECK: Found CUDA installation: {{.*}}/Inputs/CUDA-windows/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0
|
|
// CHECK: "-cc1" "-triple" "nvptx-nvidia-cuda"
|
|
// CHECK-SAME: "-fms-extensions"
|
|
// CHECK-SAME: "-fms-compatibility"
|
|
// CHECK-SAME: "-fms-compatibility-version=
|