[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / Driver / zos-ld.c
blob4d4decdd0e65b358d94fef734c199f5ed58e65c4
1 // General tests that ld invocations for z/OS are valid.
3 // 1. General C link for executable
4 // RUN: %clang -### --target=s390x-ibm-zos %s 2>&1 \
5 // RUN: | FileCheck --check-prefix=C-LD %s
7 // C-LD: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
8 // C-LD: "AMODE=64,LIST,DYNAM=DLL,MSGLEVEL=4,CASE=MIXED,REUS=RENT"
9 // C-LD-SAME: "-e" "CELQSTRT"
10 // C-LD-SAME: "-O" "CELQSTRT"
11 // C-LD-SAME: "-u" "CELQMAIN"
12 // C-LD-SAME: "-x" "/dev/null"
13 // C-LD-SAME: "-S" "//'CEE.SCEEBND2'"
14 // C-LD-SAME: "-S" "//'SYS1.CSSLIB'"
15 // C-LD-SAME: "//'CEE.SCEELIB(CELQS001)'"
16 // C-LD-SAME: "//'CEE.SCEELIB(CELQS003)'"
17 // C-LD-SAME: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}zos{{/|\\\\}}libclang_rt.builtins-s390x.a"
19 // 2. General C link for dll
20 // RUN: %clang -### --shared --target=s390x-ibm-zos %s 2>&1 \
21 // RUN: | FileCheck --check-prefix=C-LD-DLL %s
23 // C-LD-DLL: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
24 // C-LD-DLL: "AMODE=64,LIST,DYNAM=DLL,MSGLEVEL=4,CASE=MIXED,REUS=RENT"
25 // C-LD-DLL-NOT: "-e" "CELQSTRT"
26 // C-LD-DLL-NOT: "-O" "CELQSTRT"
27 // C-LD-DLL-NOT: "-u" "CELQMAIN"
28 // C-LD-DLL-SAME: "-x" "{{.*}}.x"
29 // C-LD-DLL-SAME: "-S" "//'CEE.SCEEBND2'"
30 // C-LD-DLL-SAME: "-S" "//'SYS1.CSSLIB'"
31 // C-LD-DLL-SAME: "//'CEE.SCEELIB(CELQS001)'"
32 // C-LD-DLL-SAME: "//'CEE.SCEELIB(CELQS003)'"
33 // C-LD-DLL-SAME: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}zos{{/|\\\\}}libclang_rt.builtins-s390x.a"
35 // 3. General C++ link for executable
36 // RUN: %clangxx -### --target=s390x-ibm-zos %s 2>&1 \
37 // RUN: | FileCheck --check-prefix=CXX-LD %s
39 // CXX-LD: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
40 // CXX-LD: "AMODE=64,LIST,DYNAM=DLL,MSGLEVEL=4,CASE=MIXED,REUS=RENT"
41 // CXX-LD-SAME: "-e" "CELQSTRT"
42 // CXX-LD-SAME: "-O" "CELQSTRT"
43 // CXX-LD-SAME: "-u" "CELQMAIN"
44 // CXX-LD-SAME: "-x" "/dev/null"
45 // CXX-LD-SAME: "-S" "//'CEE.SCEEBND2'"
46 // CXX-LD-SAME: "-S" "//'SYS1.CSSLIB'"
47 // CXX-LD-SAME: "//'CEE.SCEELIB(CELQS001)'"
48 // CXX-LD-SAME: "//'CEE.SCEELIB(CELQS003)'"
49 // CXX-LD-SAME: "//'CEE.SCEELIB(CRTDQCXE)'"
50 // CXX-LD-SAME: "//'CEE.SCEELIB(CRTDQCXS)'"
51 // CXX-LD-SAME: "//'CEE.SCEELIB(CRTDQCXP)'"
52 // CXX-LD-SAME: "//'CEE.SCEELIB(CRTDQCXA)'"
53 // CXX-LD-SAME: "//'CEE.SCEELIB(CRTDQXLA)'"
54 // CXX-LD-SAME: "//'CEE.SCEELIB(CRTDQUNW)'"
55 // CXX-LD-SAME: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}zos{{/|\\\\}}libclang_rt.builtins-s390x.a"
57 // 4. General C++ link for dll
58 // RUN: %clangxx -### --shared --target=s390x-ibm-zos %s 2>&1 \
59 // RUN: | FileCheck --check-prefix=CXX-LD-DLL %s
61 // CXX-LD-DLL: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
62 // CXX-LD-DLL: "AMODE=64,LIST,DYNAM=DLL,MSGLEVEL=4,CASE=MIXED,REUS=RENT"
63 // CXX-LD-DLL-NOT: "-e" "CELQSTRT"
64 // CXX-LD-DLL-NOT: "-O" "CELQSTRT"
65 // CXX-LD-DLL-NOT: "-u" "CELQMAIN"
66 // CXX-LD-DLL-SAME: "-x" "{{.*}}.x"
67 // CXX-LD-DLL-SAME: "-S" "//'CEE.SCEEBND2'"
68 // CXX-LD-DLL-SAME: "-S" "//'SYS1.CSSLIB'"
69 // CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CELQS001)'"
70 // CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CELQS003)'"
71 // CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CRTDQCXE)'"
72 // CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CRTDQCXS)'"
73 // CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CRTDQCXP)'"
74 // CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CRTDQCXA)'"
75 // CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CRTDQXLA)'"
76 // CXX-LD-DLL-SAME: "//'CEE.SCEELIB(CRTDQUNW)'"
77 // CXX-LD-DLL-SAME: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}zos{{/|\\\\}}libclang_rt.builtins-s390x.a"
79 // 5. C++ link for executable w/ -mzos-hlq-le=, -mzos-hlq-csslib=
80 // RUN: %clangxx -### --target=s390x-ibm-zos %s 2>&1 \
81 // RUN: -mzos-hlq-le=AAAA -mzos-hlq-csslib=BBBB \
82 // RUN: | FileCheck --check-prefix=CXX-LD5 %s
84 // CXX-LD5: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
85 // CXX-LD5: "AMODE=64,LIST,DYNAM=DLL,MSGLEVEL=4,CASE=MIXED,REUS=RENT"
86 // CXX-LD5-SAME: "-e" "CELQSTRT"
87 // CXX-LD5-SAME: "-O" "CELQSTRT"
88 // CXX-LD5-SAME: "-u" "CELQMAIN"
89 // CXX-LD5-SAME: "-x" "/dev/null"
90 // CXX-LD5-SAME: "-S" "//'AAAA.SCEEBND2'"
91 // CXX-LD5-SAME: "-S" "//'BBBB.CSSLIB'"
92 // CXX-LD5-SAME: "//'AAAA.SCEELIB(CELQS001)'"
93 // CXX-LD5-SAME: "//'AAAA.SCEELIB(CELQS003)'"
94 // CXX-LD5-SAME: "//'AAAA.SCEELIB(CRTDQCXE)'"
95 // CXX-LD5-SAME: "//'AAAA.SCEELIB(CRTDQCXS)'"
96 // CXX-LD5-SAME: "//'AAAA.SCEELIB(CRTDQCXP)'"
97 // CXX-LD5-SAME: "//'AAAA.SCEELIB(CRTDQCXA)'"
98 // CXX-LD5-SAME: "//'AAAA.SCEELIB(CRTDQXLA)'"
99 // CXX-LD5-SAME: "//'AAAA.SCEELIB(CRTDQUNW)'"
100 // CXX-LD5-SAME: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}zos{{/|\\\\}}libclang_rt.builtins-s390x.a"
102 // 6. C++ link for executable w/ -mzos-hlq-clang=
103 // RUN: %clangxx -### --target=s390x-ibm-zos %s 2>&1 \
104 // RUN: -mzos-hlq-clang=AAAA \
105 // RUN: | FileCheck --check-prefix=CXX-LD6 %s
107 // CXX-LD6: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
108 // CXX-LD6: "AMODE=64,LIST,DYNAM=DLL,MSGLEVEL=4,CASE=MIXED,REUS=RENT"
109 // CXX-LD6-SAME: "-e" "CELQSTRT"
110 // CXX-LD6-SAME: "-O" "CELQSTRT"
111 // CXX-LD6-SAME: "-u" "CELQMAIN"
112 // CXX-LD6-SAME: "-x" "/dev/null"
113 // CXX-LD6-SAME: "-S" "//'CEE.SCEEBND2'"
114 // CXX-LD6-SAME: "-S" "//'SYS1.CSSLIB'"
115 // CXX-LD6-SAME: "//'CEE.SCEELIB(CELQS001)'"
116 // CXX-LD6-SAME: "//'CEE.SCEELIB(CELQS003)'"
117 // CXX-LD6-SAME: "//'AAAA.SCEELIB(CRTDQCXE)'"
118 // CXX-LD6-SAME: "//'AAAA.SCEELIB(CRTDQCXS)'"
119 // CXX-LD6-SAME: "//'AAAA.SCEELIB(CRTDQCXP)'"
120 // CXX-LD6-SAME: "//'AAAA.SCEELIB(CRTDQCXA)'"
121 // CXX-LD6-SAME: "//'AAAA.SCEELIB(CRTDQXLA)'"
122 // CXX-LD6-SAME: "//'AAAA.SCEELIB(CRTDQUNW)'"
123 // CXX-LD6-SAME: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}zos{{/|\\\\}}libclang_rt.builtins-s390x.a"