1// REQUIRES: clang-driver 2// REQUIRES: x86-registered-target 3// REQUIRES: amdgpu-registered-target 4// REQUIRES: libgcc 5// UNSUPPORTED: system-windows 6 7// RUN: %clang -c -### -target x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \ 8// RUN: -std=c++11 --rocm-path=%S/Inputs/rocm -nogpulib %s 2>&1 \ 9// RUN: | FileCheck -check-prefixes=COMMON,CLANG,HIP %s 10 11// RUN: %clang -c -### -target x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \ 12// RUN: -std=c++11 --rocm-path=%S/Inputs/rocm -nobuiltininc -nogpulib %s 2>&1 \ 13// RUN: | FileCheck -check-prefixes=COMMON,NOCLANG,HIP %s 14 15// RUN: %clang -c -### -target x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \ 16// RUN: -std=c++11 --rocm-path=%S/Inputs/rocm -nogpuinc -nogpulib %s 2>&1 \ 17// RUN: | FileCheck -check-prefixes=COMMON,CLANG,NOHIP %s 18 19// COMMON-LABEL: "{{[^"]*}}clang{{[^"]*}}" "-cc1" 20// CLANG-SAME: "-internal-isystem" "{{.*}}clang/{{.*}}/include/cuda_wrappers" 21// NOCLANG-NOT: "{{.*}}clang/{{.*}}/include/cuda_wrappers" 22// HIP-SAME: "-internal-isystem" "{{.*}}Inputs/rocm/include" 23// NOHIP-NOT: "{{.*}}Inputs/rocm/include" 24// HIP-SAME: "-include" "__clang_hip_runtime_wrapper.h" 25// NOHIP-NOT: "-include" "__clang_hip_runtime_wrapper.h" 26// skip check of standard C++ include path 27// CLANG-SAME: "-internal-isystem" "{{.*}}clang/{{.*}}/include" 28// NOCLANG-NOT: "{{.*}}clang/{{.*}}/include" 29 30// COMMON-LABEL: "{{[^"]*}}clang{{[^"]*}}" "-cc1" 31// CLANG-SAME: "-internal-isystem" "{{.*}}clang/{{.*}}/include/cuda_wrappers" 32// NOCLANG-NOT: "{{.*}}clang/{{.*}}/include/cuda_wrappers" 33// HIP-SAME: "-internal-isystem" "{{.*}}Inputs/rocm/include" 34// NOHIP-NOT: "{{.*}}Inputs/rocm/include" 35// HIP-SAME: "-include" "__clang_hip_runtime_wrapper.h" 36// NOHIP-NOT: "-include" "__clang_hip_runtime_wrapper.h" 37// skip check of standard C++ include path 38// CLANG-SAME: "-internal-isystem" "{{.*}}clang/{{.*}}/include" 39// NOCLANG-NOT: "{{.*}}clang/{{.*}}/include" 40 41// RUN: %clang -c -### -target x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \ 42// RUN: -std=c++11 --rocm-path=%S/Inputs/rocm -nogpulib %s 2>&1 \ 43// RUN: --hip-version=3.5 | FileCheck -check-prefixes=ROCM35 %s 44 45// ROCM35-LABEL: "{{[^"]*}}clang{{[^"]*}}" "-cc1" 46// ROCM35-NOT: "{{.*}}clang/{{.*}}/include/cuda_wrappers" 47// ROCM35-SAME: "-internal-isystem" "{{[^"]*}}clang/{{[^"]*}}" 48// ROCM35-SAME: "-internal-isystem" "{{[^"]*}}Inputs/rocm/include" 49// ROCM35-NOT: "-include" "__clang_hip_runtime_wrapper.h" 50// skip check of standard C++ include path 51// ROCM35-SAME: "-internal-isystem" "{{[^"]*}}clang/{{[^"]*}}/include" 52