[libc][test] Adjust header paths in tests (#119623)
[llvm-project.git] / clang / test / Driver / zos-comp.c
blob1120f939175f22e95aad8d3a7b3156991a11220a
1 // Tests that the z/OS toolchain adds system includes to its search path.
3 // RUN: %clang -c -### %s --target=s390x-ibm-zos 2>&1 \
4 // RUN: | FileCheck %s
6 // CHECK: "-D_UNIX03_WITHDRAWN"
7 // CHECK-SAME: "-D_OPEN_DEFAULT"
8 // CHECK-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
9 // CHECK-SAME: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include{{(/|\\\\)}}zos_wrappers"
10 // CHECK-SAME: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include"
11 // CHECK-SAME: "-internal-isystem" "/usr/include"
12 // CHECK-SAME: "-fshort-enums"
13 // CHECK-SAME: "-fno-signed-char"
14 // CHECK-SAME: "-fno-signed-wchar"
16 // RUN: %clang -c -### -mzos-sys-include=/ABC/DEF %s 2>&1 \
17 // RUN: --target=s390x-ibm-zos \
18 // RUN: | FileCheck --check-prefixes=CHECK2 %s
20 // CHECK2: "-D_UNIX03_WITHDRAWN"
21 // CHECK2-SAME: "-D_OPEN_DEFAULT"
22 // CHECK2-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
23 // CHECK2-SAME: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include{{(/|\\\\)}}zos_wrappers"
24 // CHECK2-SAME: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include"
25 // CHECK2-SAME: "-internal-isystem" "/ABC/DEF"
26 // CHECK2-NOT: "-internal-isystem" "/usr/include"
27 // CHECK2-SAME: "-fshort-enums"
28 // CHECK2-SAME: "-fno-signed-char"
29 // CHECK2-SAME: "-fno-signed-wchar"
31 // RUN: %clang -c -### -mzos-sys-include=/ABC/DEF:/ghi/jkl %s 2>&1 \
32 // RUN: --target=s390x-ibm-zos \
33 // RUN: | FileCheck --check-prefixes=CHECK3 %s
35 // CHECK3: "-D_UNIX03_WITHDRAWN"
36 // CHECK3-SAME: "-D_OPEN_DEFAULT"
37 // CHECK3-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
38 // CHECK3-SAME: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include{{(/|\\\\)}}zos_wrappers"
39 // CHECK3-SAME: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include"
40 // CHECK3-SAME: "-internal-isystem" "/ABC/DEF"
41 // CHECK3-SAME: "-internal-isystem" "/ghi/jkl"
42 // CHECK3-NOT: "-internal-isystem" "/usr/include"
43 // CHECK3-SAME: "-fshort-enums"
44 // CHECK3-SAME: "-fno-signed-char"
45 // CHECK3-SAME: "-fno-signed-wchar"
47 // RUN: %clang -c -### -nostdinc %s 2>&1 \
48 // RUN: --target=s390x-ibm-zos \
49 // RUN: | FileCheck --check-prefixes=CHECK4 %s
51 // CHECK4: "-D_UNIX03_WITHDRAWN"
52 // CHECK4-SAME: "-D_OPEN_DEFAULT"
53 // CHECK4-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
54 // CHECK4-NOT: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include{{(/|\\\\)}}zos_wrappers"
55 // CHECK4-NOT: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include"
56 // CHECK4-NOT: "-internal-isystem" "/usr/include"
57 // CHECK4-SAME: "-fshort-enums"
58 // CHECK4-SAME: "-fno-signed-char"
59 // CHECK4-SAME: "-fno-signed-wchar"
62 // RUN: %clang -c -### -nobuiltininc %s 2>&1 \
63 // RUN: --target=s390x-ibm-zos \
64 // RUN: | FileCheck --check-prefixes=CHECK5 %s
66 // CHECK5: "-D_UNIX03_WITHDRAWN"
67 // CHECK5-SAME: "-D_OPEN_DEFAULT"
68 // CHECK5-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
69 // CHECK5-NOT: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include{{(/|\\\\)}}zos_wrappers"
70 // CHECK5-NOT: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include"
71 // CHECK5-SAME: "-internal-isystem" "/usr/include"
72 // CHECK5-SAME: "-fshort-enums"
73 // CHECK5-SAME: "-fno-signed-char"
74 // CHECK5-SAME: "-fno-signed-wchar"