1 // REQUIRES: !system-solaris
3 // The test cannot be run on Darwin because /Users will be treated as a MSVC option.
5 // RUN: %clang_cl -### -target x86_64-pc-windows-msvc --offload-arch=sm_35 -fgpu-rdc \
6 // RUN: --cuda-path=%S/Inputs/CUDA/usr/local/cuda \
7 // RUN: /Wall -x cuda -- %s 2>&1 \
8 // RUN: | FileCheck %s -check-prefix=CUDA
10 // RUN: %clang_cl -### -target x86_64-pc-windows-msvc --offload-arch=gfx1010 -fgpu-rdc --hip-link \
11 // RUN: --rocm-path=%S/Inputs/rocm /Wall -x hip -- %s 2>&1 \
12 // RUN: | FileCheck %s -check-prefix=HIP
14 // CUDA: "-cc1" "-triple" "nvptx64-nvidia-cuda" "-aux-triple" "x86_64-pc-windows-msvc"
15 // CUDA-SAME: "-Weverything"
17 // CUDA: "-cc1" "-triple" "x86_64-pc-windows-msvc{{.*}}" "-aux-triple" "nvptx64-nvidia-cuda"
18 // CUDA-SAME: "-Weverything"
21 // HIP: "-cc1" "-triple" "x86_64-pc-windows-msvc{{.*}}" "-aux-triple" "amdgcn-amd-amdhsa"
22 // HIP-SAME: "-Weverything"
23 // HIP: "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-pc-windows-msvc"
24 // HIP-SAME: "-Weverything"
25 // HIP: {{lld.* "-flavor" "gnu" "-m" "elf64_amdgpu"}}
26 // HIP: {{link.* "amdhip64.lib"}}
28 // CMake uses this option when finding packages for HIP, so
29 // make sure it does not cause error.
31 // RUN: %clang_cl --print-libgcc-file-name