Debian Codegraph @

clang/test/Driver/hip-include-path.hip

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