[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / aix-ld.c
blob7e0f2bf91e06ee5cffb48a8a43603a10846d65b1
1 // General tests that ld invocations on AIX targets are sane. Note that we use
2 // sysroot to make these tests independent of the host system.
4 // Check powerpc-ibm-aix7.1.0.0, 32-bit.
5 // RUN: %clang %s -### 2>&1 \
6 // RUN: -resource-dir=%S/Inputs/resource_dir \
7 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
8 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
9 // RUN: --unwindlib=libunwind \
10 // RUN: | FileCheck --check-prefix=CHECK-LD32 %s
11 // CHECK-LD32-NOT: warning:
12 // CHECK-LD32: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
13 // CHECK-LD32: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
14 // CHECK-LD32: "-isysroot" "[[SYSROOT:[^"]+]]"
15 // CHECK-LD32: "{{.*}}ld{{(.exe)?}}"
16 // CHECK-LD32-NOT: "-bnso"
17 // CHECK-LD32: "-b32"
18 // CHECK-LD32: "-bpT:0x10000000" "-bpD:0x20000000"
19 // CHECK-LD32: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
20 // CHECK-LD32: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
21 // CHECK-LD32-NOT: "-lc++"
22 // CHECK-LD32-NOT: "-lc++abi"
23 // CHECK-LD32: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
24 // CHECK-LD32-NOT: "--as-needed"
25 // CHECK-LD32: "-lunwind"
26 // CHECK-LD32-NOT: "--no-as-needed"
27 // CHECK-LD32-NOT: "-lm"
28 // CHECK-LD32: "-lc"
30 // Check powerpc64-ibm-aix7.1.0.0, 64-bit.
31 // RUN: %clang %s -### 2>&1 \
32 // RUN: -resource-dir=%S/Inputs/resource_dir \
33 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
34 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
35 // RUN: --unwindlib=libunwind \
36 // RUN: | FileCheck --check-prefix=CHECK-LD64 %s
37 // CHECK-LD64-NOT: warning:
38 // CHECK-LD64: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
39 // CHECK-LD64: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
40 // CHECK-LD64: "-isysroot" "[[SYSROOT:[^"]+]]"
41 // CHECK-LD64: "{{.*}}ld{{(.exe)?}}"
42 // CHECK-LD64-NOT: "-bnso"
43 // CHECK-LD64: "-b64"
44 // CHECK-LD64: "-bpT:0x100000000" "-bpD:0x110000000"
45 // CHECK-LD64: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
46 // CHECK-LD64: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
47 // CHECK-LD64-NOT: "-lc++"
48 // CHECK-LD64-NOT: "-lc++abi"
49 // CHECK-LD64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
50 // CHECK-LD64-NOT: "--as-needed"
51 // CHECK-LD64: "-lunwind"
52 // CHECK-LD64-NOT: "--no-as-needed"
53 // CHECK-LD64-NOT: "-lm"
54 // CHECK-LD64: "-lc"
56 // Check powerpc-ibm-aix7.1.0.0, 32-bit. Enable POSIX thread support.
57 // RUN: %clang %s -### 2>&1 \
58 // RUN: -resource-dir=%S/Inputs/resource_dir \
59 // RUN: -pthread \
60 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
61 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
62 // RUN: --unwindlib=libunwind \
63 // RUN: | FileCheck --check-prefix=CHECK-LD32-PTHREAD %s
64 // CHECK-LD32-PTHREAD-NOT: warning:
65 // CHECK-LD32-PTHREAD: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
66 // CHECK-LD32-PTHREAD: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
67 // CHECK-LD32-PTHREAD: "-isysroot" "[[SYSROOT:[^"]+]]"
68 // CHECK-LD32-PTHREAD: "{{.*}}ld{{(.exe)?}}"
69 // CHECK-LD32-PTHREAD-NOT: "-bnso"
70 // CHECK-LD32-PTHREAD: "-b32"
71 // CHECK-LD32-PTHREAD: "-bpT:0x10000000" "-bpD:0x20000000"
72 // CHECK-LD32-PTHREAD: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
73 // CHECK-LD32-PTHREAD: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
74 // CHECK-LD32-PTHREAD-NOT: "-lc++"
75 // CHECK-LD32-PTHREAD-NOT: "-lc++abi"
76 // CHECK-LD32-PTHREAD: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
77 // CHECK-LD32-PTHREAD-NOT: "--as-needed"
78 // CHECK-LD32-PTHREAD: "-lunwind"
79 // CHECK-LD32-PTHREAD-NOT: "--no-as-needed"
80 // CHECK-LD32-PTHREAD: "-lpthreads"
81 // CHECK-LD32-PTHREAD-NOT: "-lm"
82 // CHECK-LD32-PTHREAD: "-lc"
84 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. POSIX thread alias.
85 // RUN: %clang %s -### 2>&1 \
86 // RUN: -resource-dir=%S/Inputs/resource_dir \
87 // RUN: -pthreads \
88 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
89 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
90 // RUN: --unwindlib=libunwind \
91 // RUN: | FileCheck --check-prefix=CHECK-LD64-PTHREAD %s
92 // CHECK-LD64-PTHREAD-NOT: warning:
93 // CHECK-LD64-PTHREAD: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
94 // CHECK-LD64-PTHREAD: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
95 // CHECK-LD64-PTHREAD: "-isysroot" "[[SYSROOT:[^"]+]]"
96 // CHECK-LD64-PTHREAD: "{{.*}}ld{{(.exe)?}}"
97 // CHECK-LD64-PTHREAD-NOT: "-bnso"
98 // CHECK-LD64-PTHREAD: "-b64"
99 // CHECK-LD64-PTHREAD: "-bpT:0x100000000" "-bpD:0x110000000"
100 // CHECK-LD64-PTHREAD: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
101 // CHECK-LD64-PTHREAD: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
102 // CHECK-LD64-PTHREAD-NOT: "-lc++"
103 // CHECK-LD64-PTHREAD-NOT: "-lc++abi"
104 // CHECK-LD64-PTHREAD: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
105 // CHECK-LD64-PTHREAD-NOT: "--as-needed"
106 // CHECK-LD64-PTHREAD: "-lunwind"
107 // CHECK-LD64-PTHREAD-NOT: "--no-as-needed"
108 // CHECK-LD64-PTHREAD: "-lpthreads"
109 // CHECK-LD64-PTHREAD-NOT: "-lm"
110 // CHECK-LD64-PTHREAD: "-lc"
112 // Check powerpc-ibm-aix7.1.0.0, 32-bit. Enable profiling.
113 // RUN: %clang %s -### 2>&1 \
114 // RUN: -resource-dir=%S/Inputs/resource_dir \
115 // RUN: -p \
116 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
117 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
118 // RUN: --unwindlib=libunwind \
119 // RUN: | FileCheck --check-prefix=CHECK-LD32-PROF %s
120 // CHECK-LD32-PROF-NOT: warning:
121 // CHECK-LD32-PROF: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
122 // CHECK-LD32-PROF: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
123 // CHECK-LD32-PROF: "-isysroot" "[[SYSROOT:[^"]+]]"
124 // CHECK-LD32-PROF: "{{.*}}ld{{(.exe)?}}"
125 // CHECK-LD32-PROF-NOT: "-bnso"
126 // CHECK-LD32-PROF: "-b32"
127 // CHECK-LD32-PROF: "-bpT:0x10000000" "-bpD:0x20000000"
128 // CHECK-LD32-PROF: "[[SYSROOT]]/usr/lib{{/|\\\\}}mcrt0.o"
129 // CHECK-LD32-PROF: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
130 // CHECK-LD32-PROF-NOT: "-lc++"
131 // CHECK-LD32-PROF-NOT: "-lc++abi"
132 // CHECK-LD32-PROF: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
133 // CHECK-LD32-PROF-NOT: "--as-needed"
134 // CHECK-LD32-PROF: "-lunwind"
135 // CHECK-LD32-PROF-NOT: "--no-as-needed"
136 // CHECK-LD32-PROF-NOT: "-lm"
137 // CHECK-LD32-PROF: "-lc"
138 // CHECK-LD32-PROF: "-L[[SYSROOT]]/lib/profiled"
139 // CHECK-LD32-PROF: "-L[[SYSROOT]]/usr/lib/profiled"
141 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. Enable profiling.
142 // RUN: %clang %s -### 2>&1 \
143 // RUN: -resource-dir=%S/Inputs/resource_dir \
144 // RUN: -p \
145 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
146 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
147 // RUN: --unwindlib=libunwind \
148 // RUN: | FileCheck --check-prefix=CHECK-LD64-PROF %s
149 // CHECK-LD64-PROF-NOT: warning:
150 // CHECK-LD64-PROF: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
151 // CHECK-LD64-PROF: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
152 // CHECK-LD64-PROF: "-isysroot" "[[SYSROOT:[^"]+]]"
153 // CHECK-LD64-PROF: "{{.*}}ld{{(.exe)?}}"
154 // CHECK-LD64-PROF-NOT: "-bnso"
155 // CHECK-LD64-PROF: "-b64"
156 // CHECK-LD64-PROF: "-bpT:0x100000000" "-bpD:0x110000000"
157 // CHECK-LD64-PROF: "[[SYSROOT]]/usr/lib{{/|\\\\}}mcrt0_64.o"
158 // CHECK-LD64-PROF: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
159 // CHECK-LD64-PROF-NOT: "-lc++"
160 // CHECK-LD64-PROF-NOT: "-lc++abi"
161 // CHECK-LD64-PROF: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
162 // CHECK-LD64-PROF-NOT: "--as-needed"
163 // CHECK-LD64-PROF: "-lunwind"
164 // CHECK-LD64-PROF-NOT: "--no-as-needed"
165 // CHECK-LD64-PROF-NOT: "-lm"
166 // CHECK-LD64-PROF: "-lc"
167 // CHECK-LD64-PROF: "-L[[SYSROOT]]/lib/profiled"
168 // CHECK-LD64-PROF: "-L[[SYSROOT]]/usr/lib/profiled
170 // Check powerpc-ibm-aix7.1.0.0, 32-bit. Enable g-profiling.
171 // RUN: %clang %s -### 2>&1 \
172 // RUN: -resource-dir=%S/Inputs/resource_dir \
173 // RUN: -pg \
174 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
175 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
176 // RUN: --unwindlib=libunwind \
177 // RUN: | FileCheck --check-prefix=CHECK-LD32-GPROF %s
178 // CHECK-LD32-GPROF-NOT: warning:
179 // CHECK-LD32-GPROF: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
180 // CHECK-LD32-GPROF: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
181 // CHECK-LD32-GPROF: "-isysroot" "[[SYSROOT:[^"]+]]"
182 // CHECK-LD32-GPROF: "{{.*}}ld{{(.exe)?}}"
183 // CHECK-LD32-GPROF-NOT: "-bnso"
184 // CHECK-LD32-GPROF: "-b32"
185 // CHECK-LD32-GPROF: "-bpT:0x10000000" "-bpD:0x20000000"
186 // CHECK-LD32-GPROF: "[[SYSROOT]]/usr/lib{{/|\\\\}}gcrt0.o"
187 // CHECK-LD32-GPROF: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
188 // CHECK-LD32-GPROF-NOT: "-lc++"
189 // CHECK-LD32-GPROF-NOT: "-lc++abi"
190 // CHECK-LD32-GPROF: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
191 // CHECK-LD32-GPROF-NOT: "--as-needed"
192 // CHECK-LD32-GPROF: "-lunwind"
193 // CHECK-LD32-GPROF-NOT: "--no-as-needed"
194 // CHECK-LD32-GPROF-NOT: "-lm"
195 // CHECK-LD32-GPROF: "-lc"
196 // CHECK-LD32-GPROF: "-L[[SYSROOT]]/lib/profiled"
197 // CHECK-LD32-GPROF: "-L[[SYSROOT]]/usr/lib/profiled"
199 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. Enable g-profiling.
200 // RUN: %clang %s -### 2>&1 \
201 // RUN: -resource-dir=%S/Inputs/resource_dir \
202 // RUN: -pg \
203 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
204 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
205 // RUN: --unwindlib=libunwind \
206 // RUN: | FileCheck --check-prefix=CHECK-LD64-GPROF %s
207 // CHECK-LD64-GPROF-NOT: warning:
208 // CHECK-LD64-GPROF: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
209 // CHECK-LD64-GPROF: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
210 // CHECK-LD64-GPROF: "-isysroot" "[[SYSROOT:[^"]+]]"
211 // CHECK-LD64-GPROF: "{{.*}}ld{{(.exe)?}}"
212 // CHECK-LD64-GPROF-NOT: "-bnso"
213 // CHECK-LD64-GPROF: "-b64"
214 // CHECK-LD64-GPROF: "-bpT:0x100000000" "-bpD:0x110000000"
215 // CHECK-LD64-GPROF: "[[SYSROOT]]/usr/lib{{/|\\\\}}gcrt0_64.o"
216 // CHECK-LD64-GPROF: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
217 // CHECK-LD64-GPROF-NOT: "-lc++"
218 // CHECK-LD64-GPROF-NOT: "-lc++abi"
219 // CHECK-LD64-GPROF: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
220 // CHECK-LD64-GPROF-NOT: "--as-needed"
221 // CHECK-LD64-GPROF: "-lunwind"
222 // CHECK-LD64-GPROF-NOT: "--no-as-needed"
223 // CHECK-LD64-GPROF-NOT: "-lm"
224 // CHECK-LD64-GPROF: "-lc"
225 // CHECK-LD64-GPROF: "-L[[SYSROOT]]/lib/profiled"
226 // CHECK-LD64-GPROF: "-L[[SYSROOT]]/usr/lib/profiled"
228 // Check powerpc-ibm-aix7.1.0.0, 32-bit. Static linking.
229 // RUN: %clang %s -### 2>&1 \
230 // RUN: -resource-dir=%S/Inputs/resource_dir \
231 // RUN: -static \
232 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
233 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
234 // RUN: --unwindlib=libunwind \
235 // RUN: | FileCheck --check-prefix=CHECK-LD32-STATIC %s
236 // CHECK-LD32-STATIC-NOT: warning:
237 // CHECK-LD32-STATIC: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
238 // CHECK-LD32-STATIC: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
239 // CHECK-LD32-STATIC: "-isysroot" "[[SYSROOT:[^"]+]]"
240 // CHECK-LD32-STATIC: "{{.*}}ld{{(.exe)?}}"
241 // CHECK-LD32-STATIC: "-bnso"
242 // CHECK-LD32-STATIC: "-b32"
243 // CHECK-LD32-STATIC: "-bpT:0x10000000" "-bpD:0x20000000"
244 // CHECK-LD32-STATIC: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
245 // CHECK-LD32-STATIC: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
246 // CHECK-LD32-STATIC-NOT: "-lc++"
247 // CHECK-LD32-STATIC-NOT: "-lc++abi"
248 // CHECK-LD32-STATIC: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
249 // CHECK-LD32-STATIC-NOT: "--as-needed"
250 // CHECK-LD32-STATIC-NOT: "-lunwind"
251 // CHECK-LD32-STATIC-NOT: "--no-as-needed"
252 // CHECK-LD32-STATIC-NOT: "-lm"
253 // CHECK-LD32-STATIC: "-lc"
255 // Check powerpc-ibm-aix7.1.0.0, 32-bit. Library search path.
256 // RUN: %clang %s -### 2>&1 \
257 // RUN: -resource-dir=%S/Inputs/resource_dir \
258 // RUN: -L%S/Inputs/aix_ppc_tree/powerpc-ibm-aix7.1.0.0 \
259 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
260 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
261 // RUN: --unwindlib=libunwind \
262 // RUN: | FileCheck --check-prefix=CHECK-LD32-LIBP %s
263 // CHECK-LD32-LIBP-NOT: warning:
264 // CHECK-LD32-LIBP: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
265 // CHECK-LD32-LIBP: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
266 // CHECK-LD32-LIBP: "-isysroot" "[[SYSROOT:[^"]+]]"
267 // CHECK-LD32-LIBP: "{{.*}}ld{{(.exe)?}}"
268 // CHECK-LD32-LIBP-NOT: "-bnso"
269 // CHECK-LD32-LIBP: "-b32"
270 // CHECK-LD32-LIBP: "-bpT:0x10000000" "-bpD:0x20000000"
271 // CHECK-LD32-LIBP: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
272 // CHECK-LD32-LIBP: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
273 // CHECK-LD32-LIBP: "-L[[SYSROOT]]/powerpc-ibm-aix7.1.0.0"
274 // CHECK-LD32-LIBP-NOT: "-lc++"
275 // CHECK-LD32-LIBP-NOT: "-lc++abi"
276 // CHECK-LD32-LIBP: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
277 // CHECK-LD32-LIBP-NOT: "--as-needed"
278 // CHECK-LD32-LIBP: "-lunwind"
279 // CHECK-LD32-LIBP-NOT: "--no-as-needed"
280 // CHECK-LD32-LIBP-NOT: "-lm"
281 // CHECK-LD32-LIBP: "-lc"
283 // Check powerpc-ibm-aix7.1.0.0, 32-bit. nostdlib.
284 // RUN: %clang %s -### 2>&1 \
285 // RUN: -resource-dir=%S/Inputs/resource_dir \
286 // RUN: -nostdlib \
287 // RUN: -pthread \
288 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
289 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
290 // RUN: | FileCheck --check-prefix=CHECK-LD32-NO-STD-LIB %s
291 // CHECK-LD32-NO-STD-LIB-NOT: warning:
292 // CHECK-LD32-NO-STD-LIB: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
293 // CHECK-LD32-NO-STD-LIB: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
294 // CHECK-LD32-NO-STD-LIB: "-isysroot" "[[SYSROOT:[^"]+]]"
295 // CHECK-LD32-NO-STD-LIB: "{{.*}}ld{{(.exe)?}}"
296 // CHECK-LD32-NO-STD-LIB-NOT: "-bnso"
297 // CHECK-LD32-NO-STD-LIB: "-b32"
298 // CHECK-LD32-NO-STD-LIB: "-bpT:0x10000000" "-bpD:0x20000000"
299 // CHECK-LD32-NO-STD-LIB-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
300 // CHECK-LD32-NO-STD-LIB-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
301 // CHECK-LD32-NO-STD-LIB-NOT: "-lc++"
302 // CHECK-LD32-NO-STD-LIB-NOT: "-lc++abi"
303 // CHECK-LD32-NO-STD-LIB-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
304 // CHECK-LD32-NO-STD-LIB-NOT: "--as-needed"
305 // CHECK-LD32-NO-STD-LIB-NOT: "-lunwind"
306 // CHECK-LD32-NO-STD-LIB-NOT: "--no-as-needed"
307 // CHECK-LD32-NO-STD-LIB-NOT: "-lpthreads"
308 // CHECK-LD32-NO-STD-LIB-NOT: "-lm"
309 // CHECK-LD32-NO-STD-LIB-NOT: "-lc"
311 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. nodefaultlibs.
312 // RUN: %clang %s -### 2>&1 \
313 // RUN: -resource-dir=%S/Inputs/resource_dir \
314 // RUN: -nodefaultlibs \
315 // RUN: -pthread \
316 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
317 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
318 // RUN: | FileCheck --check-prefix=CHECK-LD64-NO-DEFAULT-LIBS %s
319 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: warning:
320 // CHECK-LD64-NO-DEFAULT-LIBS: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
321 // CHECK-LD64-NO-DEFAULT-LIBS: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
322 // CHECK-LD64-NO-DEFAULT-LIBS: "-isysroot" "[[SYSROOT:[^"]+]]"
323 // CHECK-LD64-NO-DEFAULT-LIBS: "{{.*}}ld{{(.exe)?}}"
324 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-bnso"
325 // CHECK-LD64-NO-DEFAULT-LIBS: "-b64"
326 // CHECK-LD64-NO-DEFAULT-LIBS: "-bpT:0x100000000" "-bpD:0x110000000"
327 // CHECK-LD64-NO-DEFAULT-LIBS: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
328 // CHECK-LD64-NO-DEFAULT-LIBS: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
329 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lc++"
330 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lc++abi"
331 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
332 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "--as-needed"
333 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lunwind"
334 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "--no-as-needed"
335 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lpthreads"
336 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lm"
337 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lc"
339 // Check powerpc-ibm-aix7.1.0.0, 32-bit. 'bcdtors' and argument order.
340 // RUN: %clang %s 2>&1 -### \
341 // RUN: -resource-dir=%S/Inputs/resource_dir \
342 // RUN: -Wl,-bnocdtors \
343 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
344 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
345 // RUN: --unwindlib=libunwind \
346 // RUN: | FileCheck --check-prefix=CHECK-LD32-ARG-ORDER %s
347 // CHECK-LD32-ARG-ORDER: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
348 // CHECK-LD32-ARG-ORDER: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
349 // CHECK-LD32-ARG-ORDER: "-isysroot" "[[SYSROOT:[^"]+]]"
350 // CHECK-LD32-ARG-ORDER: "{{.*}}ld{{(.exe)?}}"
351 // CHECK-LD32-ARG-ORDER-NOT: "-bnso"
352 // CHECK-LD32-ARG-ORDER: "-b32"
353 // CHECK-LD32-ARG-ORDER: "-bpT:0x10000000" "-bpD:0x20000000"
354 // CHECK-LD32-ARG-ORDER: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
355 // CHECK-LD32-ARG-ORDER: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
356 // CHECK-LD32-ARG-ORDER: "-bcdtors:all:0:s"
357 // CHECK-LD32-ARG-ORDER: "-bnocdtors"
358 // CHECK-LD32-ARG-ORDER-NOT: "-bcdtors:all:0:s"
359 // CHECK-LD32-ARG-ORDER-NOT: "-lc++"
360 // CHECK-LD32-ARG-ORDER-NOT: "-lc++abi"
361 // CHECK-LD32-ARG-ORDER: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
362 // CHECK-LD32-ARG-ORDER-NOT: "--as-needed"
363 // CHECK-LD32-ARG-ORDER: "-lunwind"
364 // CHECK-LD32-ARG-ORDER-NOT: "--no-as-needed"
365 // CHECK-LD32-ARG-ORDER-NOT: "-lm"
366 // CHECK-LD32-ARG-ORDER: "-lc"
368 // Check powerpc-ibm-aix7.1.0.0, 32-bit. 'bcdtors' and argument order.
369 // RUN: %clangxx %s 2>&1 -### \
370 // RUN: -resource-dir=%S/Inputs/resource_dir \
371 // RUN: -Wl,-bnocdtors \
372 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
373 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
374 // RUN: --unwindlib=libunwind \
375 // RUN: | FileCheck --check-prefix=CHECK-LD32-CXX-ARG-ORDER %s
376 // CHECK-LD32-CXX-ARG-ORDER: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
377 // CHECK-LD32-CXX-ARG-ORDER: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
378 // CHECK-LD32-CXX-ARG-ORDER: "-isysroot" "[[SYSROOT:[^"]+]]"
379 // CHECK-LD32-CXX-ARG-ORDER: "{{.*}}ld{{(.exe)?}}"
380 // CHECK-LD32-CXX-ARG-ORDER-NOT: "-bnso"
381 // CHECK-LD32-CXX-ARG-ORDER: "-b32"
382 // CHECK-LD32-CXX-ARG-ORDER: "-bpT:0x10000000" "-bpD:0x20000000"
383 // CHECK-LD32-CXX-ARG-ORDER: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
384 // CHECK-LD32-CXX-ARG-ORDER: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
385 // CHECK-LD32-CXX-ARG-ORDER: "-bcdtors:all:0:s"
386 // CHECK-LD32-CXX-ARG-ORDER: "-bnocdtors"
387 // CHECK-LD32-CXX-ARG-ORDER-NOT: "-bcdtors:all:0:s"
388 // CHECK-LD32-CXX-ARG-ORDER: "-lc++"
389 // CHECK-LD32-CXX-ARG-ORDER: "-lc++abi"
390 // CHECK-LD32-CXX-ARG-ORDER: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
391 // CHECK-LD32-CXX-ARG-ORDER-NOT: "--as-needed"
392 // CHECK-LD32-CXX-ARG-ORDER: "-lunwind"
393 // CHECK-LD32-CXX-ARG-ORDER-NOT: "--no-as-needed"
394 // CHECK-LD32-CXX-ARG-ORDER: "-lm"
395 // CHECK-LD32-CXX-ARG-ORDER: "-lc"
397 // Check powerpc-ibm-aix7.1.0.0, 32-bit. lc++ and lc order.
398 // RUN: %clangxx %s 2>&1 -### \
399 // RUN: -resource-dir=%S/Inputs/resource_dir \
400 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
401 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
402 // RUN: --unwindlib=libunwind \
403 // RUN: | FileCheck --check-prefix=CHECK-LD32-CXX-ARG-LCXX %s
404 // CHECK-LD32-CXX-ARG-LCXX: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
405 // CHECK-LD32-CXX-ARG-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
406 // CHECK-LD32-CXX-ARG-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
407 // CHECK-LD32-CXX-ARG-LCXX: "{{.*}}ld{{(.exe)?}}"
408 // CHECK-LD32-CXX-ARG-LCXX: "-b32"
409 // CHECK-LD32-CXX-ARG-LCXX: "-bpT:0x10000000" "-bpD:0x20000000"
410 // CHECK-LD32-CXX-ARG-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
411 // CHECK-LD32-CXX-ARG-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
412 // CHECK-LD32-CXX-ARG-LCXX: "-lc++"
413 // CHECK-LD32-CXX-ARG-LCXX: "-lc++abi"
414 // CHECK-LD32-CXX-ARG-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
415 // CHECK-LD32-CXX-ARG-LCXX-NOT: "--as-needed"
416 // CHECK-LD32-CXX-ARG-LCXX: "-lunwind"
417 // CHECK-LD32-CXX-ARG-LCXX-NOT: "--no-as-needed"
418 // CHECK-LD32-CXX-ARG-LCXX: "-lm"
419 // CHECK-LD32-CXX-ARG-LCXX: "-lc"
421 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. lc++ and lc order.
422 // RUN: %clangxx %s 2>&1 -### \
423 // RUN: -resource-dir=%S/Inputs/resource_dir \
424 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
425 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
426 // RUN: --unwindlib=libunwind \
427 // RUN: | FileCheck --check-prefix=CHECK-LD64-CXX-ARG-LCXX %s
428 // CHECK-LD64-CXX-ARG-LCXX: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
429 // CHECK-LD64-CXX-ARG-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
430 // CHECK-LD64-CXX-ARG-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
431 // CHECK-LD64-CXX-ARG-LCXX: "{{.*}}ld{{(.exe)?}}"
432 // CHECK-LD64-CXX-ARG-LCXX: "-b64"
433 // CHECK-LD64-CXX-ARG-LCXX: "-bpT:0x100000000" "-bpD:0x110000000"
434 // CHECK-LD64-CXX-ARG-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
435 // CHECK-LD64-CXX-ARG-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
436 // CHECK-LD64-CXX-ARG-LCXX: "-lc++"
437 // CHECK-LD64-CXX-ARG-LCXX: "-lc++abi"
438 // CHECK-LD64-CXX-ARG-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
439 // CHECK-LD64-CXX-ARG-LCXX-NOT: "--as-needed"
440 // CHECK-LD64-CXX-ARG-LCXX: "-lunwind"
441 // CHECK-LD64-CXX-ARG-LCXX-NOT: "--no-as-needed"
442 // CHECK-LD64-CXX-ARG-LCXX: "-lm"
443 // CHECK-LD64-CXX-ARG-LCXX: "-lc"
445 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -nodefaultlibs.
446 // RUN: %clangxx %s 2>&1 -### \
447 // RUN: -resource-dir=%S/Inputs/resource_dir \
448 // RUN: -nodefaultlibs \
449 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
450 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
451 // RUN: --unwindlib=libunwind \
452 // RUN: | FileCheck --check-prefix=CHECK-LD32-NODEFLIB-LCXX %s
453 // CHECK-LD32-NODEFLIB-LCXX: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
454 // CHECK-LD32-NODEFLIB-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
455 // CHECK-LD32-NODEFLIB-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
456 // CHECK-LD32-NODEFLIB-LCXX: "{{.*}}ld{{(.exe)?}}"
457 // CHECK-LD32-NODEFLIB-LCXX: "-b32"
458 // CHECK-LD32-NODEFLIB-LCXX: "-bpT:0x10000000" "-bpD:0x20000000"
459 // CHECK-LD32-NODEFLIB-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
460 // CHECK-LD32-NODEFLIB-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
461 // CHECK-LD32-NODEFLIB-LCXX-NOT: "-lc++"
462 // CHECK-LD32-NODEFLIB-LCXX-NOT: "-lc++abi"
463 // CHECK-LD32-NODEFLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
464 // CHECK-LD32-NODEFLIB-LCXX-NOT: "--as-needed"
465 // CHECK-LD32-NODEFLIB-LCXX-NOT: "-lunwind"
466 // CHECK-LD32-NODEFLIB-LCXX-NOT: "--no-as-needed"
467 // CHECK-LD32-NODEFLIB-LCXX-NOT: "-lm"
468 // CHECK-LD32-NODEFLIB-LCXX-NOT: "-lc"
470 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -nodefaultlibs.
471 // RUN: %clangxx %s 2>&1 -### \
472 // RUN: -resource-dir=%S/Inputs/resource_dir \
473 // RUN: -nodefaultlibs \
474 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
475 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
476 // RUN: --unwindlib=libunwind \
477 // RUN: | FileCheck --check-prefix=CHECK-LD64-NODEFLIB-LCXX %s
478 // CHECK-LD64-NODEFLIB-LCXX: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
479 // CHECK-LD64-NODEFLIB-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
480 // CHECK-LD64-NODEFLIB-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
481 // CHECK-LD64-NODEFLIB-LCXX: "{{.*}}ld{{(.exe)?}}"
482 // CHECK-LD64-NODEFLIB-LCXX: "-b64"
483 // CHECK-LD64-NODEFLIB-LCXX: "-bpT:0x100000000" "-bpD:0x110000000"
484 // CHECK-LD64-NODEFLIB-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
485 // CHECK-LD64-NODEFLIB-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
486 // CHECK-LD64-NODEFLIB-LCXX-NOT: "-lc++"
487 // CHECK-LD64-NODEFLIB-LCXX-NOT: "-lc++abi"
488 // CHECK-LD64-NODEFLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
489 // CHECK-LD64-NODEFLIB-LCXX-NOT: "--as-needed"
490 // CHECK-LD64-NODEFLIB-LCXX-NOT: "-lunwind"
491 // CHECK-LD64-NODEFLIB-LCXX-NOT: "--no-as-needed"
492 // CHECK-LD64-NODEFLIB-LCXX-NOT: "-lm"
493 // CHECK-LD64-NODEFLIB-LCXX-NOT: "-lc"
495 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -nostdlib.
496 // RUN: %clangxx %s 2>&1 -### \
497 // RUN: -resource-dir=%S/Inputs/resource_dir \
498 // RUN: -nostdlib \
499 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
500 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
501 // RUN: --unwindlib=libunwind \
502 // RUN: | FileCheck --check-prefix=CHECK-LD32-NOSTDLIB-LCXX %s
503 // CHECK-LD32-NOSTDLIB-LCXX: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
504 // CHECK-LD32-NOSTDLIB-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
505 // CHECK-LD32-NOSTDLIB-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
506 // CHECK-LD32-NOSTDLIB-LCXX: "{{.*}}ld{{(.exe)?}}"
507 // CHECK-LD32-NOSTDLIB-LCXX: "-b32"
508 // CHECK-LD32-NOSTDLIB-LCXX: "-bpT:0x10000000" "-bpD:0x20000000"
509 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
510 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
511 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lc++"
512 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lc++abi"
513 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
514 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "--as-needed"
515 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lunwind"
516 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "--no-as-needed"
517 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lm"
518 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lc"
520 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -nostdlib.
521 // RUN: %clangxx %s 2>&1 -### \
522 // RUN: -resource-dir=%S/Inputs/resource_dir \
523 // RUN: -nostdlib \
524 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
525 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
526 // RUN: --unwindlib=libunwind \
527 // RUN: | FileCheck --check-prefix=CHECK-LD64-NOSTDLIB-LCXX %s
528 // CHECK-LD64-NOSTDLIB-LCXX: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
529 // CHECK-LD64-NOSTDLIB-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
530 // CHECK-LD64-NOSTDLIB-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
531 // CHECK-LD64-NOSTDLIB-LCXX: "{{.*}}ld{{(.exe)?}}"
532 // CHECK-LD64-NOSTDLIB-LCXX: "-b64"
533 // CHECK-LD64-NOSTDLIB-LCXX: "-bpT:0x100000000" "-bpD:0x110000000"
534 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
535 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
536 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lc++"
537 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lc++abi"
538 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
539 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "--as-needed"
540 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lunwind"
541 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "--no-as-needed"
542 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lm"
543 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lc"
545 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -nostdlib++.
546 // Note: crti is still linked for initialization/finalization functionality.
547 // RUN: %clangxx %s 2>&1 -### \
548 // RUN: -resource-dir=%S/Inputs/resource_dir \
549 // RUN: -nostdlib++ \
550 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
551 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
552 // RUN: --unwindlib=libunwind \
553 // RUN: | FileCheck --check-prefix=CHECK-LD32-NOSTDLIBXX-LCXX %s
554 // CHECK-LD32-NOSTDLIBXX-LCXX: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
555 // CHECK-LD32-NOSTDLIBXX-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
556 // CHECK-LD32-NOSTDLIBXX-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
557 // CHECK-LD32-NOSTDLIBXX-LCXX: "{{.*}}ld{{(.exe)?}}"
558 // CHECK-LD32-NOSTDLIBXX-LCXX: "-b32"
559 // CHECK-LD32-NOSTDLIBXX-LCXX: "-bpT:0x10000000" "-bpD:0x20000000"
560 // CHECK-LD32-NOSTDLIBXX-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
561 // CHECK-LD32-NOSTDLIBXX-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
562 // CHECK-LD32-NOSTDLIBXX-LCXX-NOT: "-lc++"
563 // CHECK-LD32-NOSTDLIBXX-LCXX-NOT: "-lc++abi"
564 // CHECK-LD32-NOSTDLIBXX-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
565 // CHECK-LD32-NOSTDLIBXX-LCXX-NOT: "--as-needed"
566 // CHECK-LD32-NOSTDLIBXX-LCXX: "-lunwind"
567 // CHECK-LD32-NOSTDLIBXX-LCXX-NOT: "--no-as-needed"
568 // CHECK-LD32-NOSTDLIBXX-LCXX: "-lm"
569 // CHECK-LD32-NOSTDLIBXX-LCXX: "-lc"
571 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -nostdlib++.
572 // RUN: %clangxx %s 2>&1 -### \
573 // RUN: -resource-dir=%S/Inputs/resource_dir \
574 // RUN: -nostdlib++ \
575 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
576 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
577 // RUN: --unwindlib=libunwind \
578 // RUN: | FileCheck --check-prefix=CHECK-LD64-NOSTDLIBXX-LCXX %s
579 // CHECK-LD64-NOSTDLIBXX-LCXX: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
580 // CHECK-LD64-NOSTDLIBXX-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
581 // CHECK-LD64-NOSTDLIBXX-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
582 // CHECK-LD64-NOSTDLIBXX-LCXX: "{{.*}}ld{{(.exe)?}}"
583 // CHECK-LD64-NOSTDLIBXX-LCXX: "-b64"
584 // CHECK-LD64-NOSTDLIBXX-LCXX: "-bpT:0x100000000" "-bpD:0x110000000"
585 // CHECK-LD64-NOSTDLIBXX-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
586 // CHECK-LD64-NOSTDLIBXX-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
587 // CHECK-LD64-NOSTDLIBXX-LCXX-NOT: "-lc++"
588 // CHECK-LD64-NOSTDLIBXX-LCXX-NOT: "-lc++abi"
589 // CHECK-LD64-NOSTDLIBXX-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
590 // CHECK-LD64-NOSTDLIBXX-LCXX-NOT: "--as-needed"
591 // CHECK-LD64-NOSTDLIBXX-LCXX: "-lunwind"
592 // CHECK-LD64-NOSTDLIBXX-LCXX-NOT: "--no-as-needed"
593 // CHECK-LD64-NOSTDLIBXX-LCXX: "-lm"
594 // CHECK-LD64-NOSTDLIBXX-LCXX: "-lc"
596 // Check powerpc64-ibm-aix7.1.0.0, 32-bit. -nostartfiles.
597 // RUN: %clangxx %s 2>&1 -### \
598 // RUN: -resource-dir=%S/Inputs/resource_dir \
599 // RUN: -nostartfiles \
600 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
601 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
602 // RUN: --unwindlib=libunwind \
603 // RUN: | FileCheck --check-prefix=CHECK-LD32-NOSTARTFILES-LCXX %s
604 // CHECK-LD32-NOSTARTFILES-LCXX: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
605 // CHECK-LD32-NOSTARTFILES-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
606 // CHECK-LD32-NOSTARTFILES-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
607 // CHECK-LD32-NOSTARTFILES-LCXX: "{{.*}}ld{{(.exe)?}}"
608 // CHECK-LD32-NOSTARTFILES-LCXX: "-b32"
609 // CHECK-LD32-NOSTARTFILES-LCXX: "-bpT:0x10000000" "-bpD:0x20000000"
610 // CHECK-LD32-NOSTARTFILES-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
611 // CHECK-LD32-NOSTARTFILES-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
612 // CHECK-LD32-NOSTARTFILES-LCXX: "-lc++"
613 // CHECK-LD32-NOSTARTFILES-LCXX: "-lc++abi"
614 // CHECK-LD32-NOSTARTFILES-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
615 // CHECK-LD32-NOSTARTFILES-LCXX-NOT: "--as-needed"
616 // CHECK-LD32-NOSTARTFILES-LCXX: "-lunwind"
617 // CHECK-LD32-NOSTARTFILES-LCXX-NOT: "--no-as-needed"
618 // CHECK-LD32-NOSTARTFILES-LCXX: "-lm"
619 // CHECK-LD32-NOSTARTFILES-LCXX: "-lc"
621 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -nostartfiles.
622 // RUN: %clangxx %s 2>&1 -### \
623 // RUN: -resource-dir=%S/Inputs/resource_dir \
624 // RUN: -nostartfiles \
625 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
626 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
627 // RUN: --unwindlib=libunwind \
628 // RUN: | FileCheck --check-prefix=CHECK-LD32-NOSTARTFILES-LCXX %s
629 // CHECK-LD64-NOSTARTFILES-LCXX: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
630 // CHECK-LD64-NOSTARTFILES-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
631 // CHECK-LD64-NOSTARTFILES-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
632 // CHECK-LD64-NOSTARTFILES-LCXX: "{{.*}}ld{{(.exe)?}}"
633 // CHECK-LD64-NOSTARTFILES-LCXX: "-b64"
634 // CHECK-LD64-NOSTARTFILES-LCXX: "-bpT:0x100000000" "-bpD:0x110000000"
635 // CHECK-LD64-NOSTARTFILES-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
636 // CHECK-LD64-NOSTARTFILES-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
637 // CHECK-LD64-NOSTARTFILES-LCXX: "-lc++"
638 // CHECK-LD64-NOSTARTFILES-LCXX: "-lc++abi"
639 // CHECK-LD64-NOSTARTFILES-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
640 // CHECK-LD64-NOSTARTFILES-LCXX-NOT: "--as-needed"
641 // CHECK-LD64-NOSTARTFILES-LCXX: "-lunwind"
642 // CHECK-LD64-NOSTARTFILES-LCXX-NOT: "--no-as-needed"
643 // CHECK-LD64-NOSTARTFILES-LCXX: "-lm"
644 // CHECK-LD64-NOSTARTFILES-LCXX: "-lc"
646 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -stdlib=libstdc++ invokes fatal error.
647 // RUN: not --crash %clangxx %s 2>&1 -### \
648 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
649 // RUN: -stdlib=libstdc++ -nostdinc++ \
650 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
651 // RUN: | FileCheck --check-prefix=CHECK-LD-LIBSTDCXX %s
653 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -stdlib=libstdc++ invokes fatal error.
654 // RUN: not --crash %clangxx %s 2>&1 -### \
655 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
656 // RUN: -stdlib=libstdc++ -nostdinc++ \
657 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
658 // RUN: | FileCheck --check-prefix=CHECK-LD-LIBSTDCXX %s
659 // CHECK-LD-LIBSTDCXX: LLVM ERROR: linking libstdc++ unimplemented on AIX
661 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -shared.
662 // RUN: %clangxx -x c++ %s 2>&1 -### \
663 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
664 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
665 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
666 // RUN: --unwindlib=libunwind \
667 // RUN: | FileCheck --check-prefix=CHECK-LD32-SHARED %s
669 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -shared (with exp option strings in other opt).
670 // RUN: %clangxx -x c++ %s 2>&1 -### \
671 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
672 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
673 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
674 // RUN: --unwindlib=libunwind \
675 // RUN: -Wl,-Z/expall/expfull/a-bE:/a-bexport:/ \
676 // RUN: | FileCheck --check-prefix=CHECK-LD32-SHARED %s
678 // CHECK-LD32-SHARED: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
679 // CHECK-LD32-SHARED: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
680 // CHECK-LD32-SHARED: "-isysroot" "[[SYSROOT:[^"]+]]"
681 // CHECK-LD32-SHARED: "{{.*}}llvm-nm"
682 // CHECK-LD32-SHARED: "--export-symbols"
683 // CHECK-LD32-SHARED: "-X" "32"
684 // CHECK-LD32-SHARED: "{{.*}}ld{{(.exe)?}}"
685 // CHECK-LD32-SHARED: "-bM:SRE"
686 // CHECK-LD32-SHARED: "-bnoentry"
687 // CHECK-LD32-SHARED: "-b32"
688 // CHECK-LD32-SHARED: "-bpT:0x10000000" "-bpD:0x20000000"
689 // CHECK-LD32-SHARED-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
690 // CHECK-LD32-SHARED-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
691 // CHECK-LD32-SHARED: "-lc++"
692 // CHECK-LD32-SHARED: "-lc++abi"
693 // CHECK-LD32-SHARED: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
694 // CHECK-LD32-SHARED-NOT: "--as-needed"
695 // CHECK-LD32-SHARED: "-lunwind"
696 // CHECK-LD32-SHARED-NOT: "--no-as-needed"
697 // CHECK-LD32-SHARED: "-lm"
698 // CHECK-LD32-SHARED: "-lc"
700 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -shared with export list.
701 // RUN: %clangxx -x c++ %s 2>&1 -### \
702 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
703 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
704 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
705 // RUN: -Wl,-bE:input.exp \
706 // RUN: | FileCheck --check-prefix=CHECK-LD32-SHARED-EXPORTS %s
708 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -shared with export list (no -Wl, variant).
709 // RUN: %clangxx -x c++ %s 2>&1 -### \
710 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
711 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
712 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
713 // RUN: -bE:input.exp \
714 // RUN: | FileCheck --check-prefix=CHECK-LD32-SHARED-EXPORTS %s
716 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -shared with export list (-Xlinker variant).
717 // RUN: %clangxx -x c++ %s 2>&1 -### \
718 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
719 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
720 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
721 // RUN: -Xlinker -bE:input.exp \
722 // RUN: | FileCheck --check-prefix=CHECK-LD32-SHARED-EXPORTS %s
724 // CHECK-LD32-SHARED-EXPORTS: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
725 // CHECK-LD32-SHARED-EXPORTS: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
726 // CHECK-LD32-SHARED-EXPORTS: "-isysroot" "[[SYSROOT:[^"]+]]"
727 // CHECK-LD32-SHARED-EXPORTS-NOT: "{{.*}}llvm-nm"
728 // CHECK-LD32-SHARED-EXPORTS-NOT: "-X"
729 // CHECK-LD32-SHARED-EXPORTS-NOT: "32"
730 // CHECK-LD32-SHARED-EXPORTS: "{{.*}}ld{{(.exe)?}}"
731 // CHECK-LD32-SHARED-EXPORTS: "-bM:SRE"
732 // CHECK-LD32-SHARED-EXPORTS: "-bnoentry"
733 // CHECK-LD32-SHARED-EXPORTS: "-b32"
734 // CHECK-LD32-SHARED-EXPORTS: "-bpT:0x10000000" "-bpD:0x20000000"
735 // CHECK-LD32-SHARED-EXPORTS-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
736 // CHECK-LD32-SHARED-EXPORTS-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
737 // CHECK-LD32-SHARED-EXPORTS: "-b{{(" ")?}}E:input.exp"
738 // CHECK-LD32-SHARED-EXPORTS-NOT: "-bE:{{[^"]+}}"
739 // CHECK-LD32-SHARED-EXPORTS: "-lc++"
740 // CHECK-LD32-SHARED-EXPORTS: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
741 // CHECK-LD32-SHARED-EXPORTS: "-lm"
742 // CHECK-LD32-SHARED-EXPORTS: "-lc"
744 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared.
745 // RUN: %clangxx -x c++ %s 2>&1 -### \
746 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
747 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
748 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
749 // RUN: --unwindlib=libunwind \
750 // RUN: | FileCheck --check-prefix=CHECK-LD64-SHARED %s
751 // CHECK-LD64-SHARED: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
752 // CHECK-LD64-SHARED: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
753 // CHECK-LD64-SHARED: "-isysroot" "[[SYSROOT:[^"]+]]"
754 //CHECK-LD64-SHARED: "{{.*}}llvm-nm"
755 // CHECK-LD64-SHARED: "--export-symbols"
756 // CHECK-LD64-SHARED: "-X" "64"
757 // CHECK-LD64-SHARED: "{{.*}}ld{{(.exe)?}}"
758 // CHECK-LD64-SHARED: "-bM:SRE"
759 // CHECK-LD64-SHARED: "-bnoentry"
760 // CHECK-LD64-SHARED: "-b64"
761 // CHECK-LD64-SHARED: "-bpT:0x100000000" "-bpD:0x110000000"
762 // CHECK-LD64-SHARED-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
763 // CHECK-LD64-SHARED-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
764 // CHECK-LD64-SHARED: "-lc++"
765 // CHECK-LD64-SHARED: "-lc++abi"
766 // CHECK-LD64-SHARED: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
767 // CHECK-LD64-SHARED-NOT: "--as-needed"
768 // CHECK-LD64-SHARED: "-lunwind"
769 // CHECK-LD64-SHARED-NOT: "--no-as-needed"
770 // CHECK-LD64-SHARED: "-lm"
771 // CHECK-LD64-SHARED: "-lc"
773 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -fno-exceptions.
774 // RUN: %clangxx %s 2>&1 -### \
775 // RUN: -resource-dir=%S/Inputs/resource_dir \
776 // RUN: -fno-exceptions \
777 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
778 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
779 // RUN: | FileCheck --check-prefix=CHECK-LD32-NOEXCEPTIONS %s
780 // CHECK-LD32-NOEXCEPTIONS: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
781 // CHECK-LD32-NOEXCEPTIONS: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
782 // CHECK-LD32-NOEXCEPTIONS: "-isysroot" "[[SYSROOT:[^"]+]]"
783 // CHECK-LD32-NOEXCEPTIONS: "{{.*}}ld{{(.exe)?}}"
784 // CHECK-LD32-NOEXCEPTIONS: "-b32"
785 // CHECK-LD32-NOEXCEPTIONS: "-bpT:0x10000000" "-bpD:0x20000000"
786 // CHECK-LD32-NOEXCEPTIONS: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
787 // CHECK-LD32-NOEXCEPTIONS: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
788 // CHECK-LD32-NOEXCEPTIONS: "-lc++"
789 // CHECK-LD32-NOEXCEPTIONS: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
790 // CHECK-LD32-NOEXCEPTIONS: "-lm"
791 // CHECK-LD32-NOEXCEPTIONS: "-lc"
793 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared with export list.
794 // RUN: %clangxx -x c++ %s 2>&1 -### \
795 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
796 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
797 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
798 // RUN: -Wl,-bE:input.exp \
799 // RUN: | FileCheck --check-prefix=CHECK-LD64-SHARED-EXPORTS %s
801 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared with export list (no -Wl, variant).
802 // RUN: %clangxx -x c++ %s 2>&1 -### \
803 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
804 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
805 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
806 // RUN: -bE:input.exp \
807 // RUN: | FileCheck --check-prefix=CHECK-LD64-SHARED-EXPORTS %s
809 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared with export list (-Xlinker variant).
810 // RUN: %clangxx -x c++ %s 2>&1 -### \
811 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
812 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
813 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
814 // RUN: -Xlinker -bE:input.exp \
815 // RUN: | FileCheck --check-prefix=CHECK-LD64-SHARED-EXPORTS %s
817 // CHECK-LD64-SHARED-EXPORTS: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
818 // CHECK-LD64-SHARED-EXPORTS: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
819 // CHECK-LD64-SHARED-EXPORTS: "-isysroot" "[[SYSROOT:[^"]+]]"
820 // CHECK-LD64-SHARED-EXPORTS-NOT: "{{.*}}llvm-nm"
821 // CHECK-LD64-SHARED-EXPORTS-NOT: "-X"
822 // CHECK-LD64-SHARED-EXPORTS-NOT: "64"
823 // CHECK-LD64-SHARED-EXPORTS: "{{.*}}ld{{(.exe)?}}"
824 // CHECK-LD64-SHARED-EXPORTS: "-bM:SRE"
825 // CHECK-LD64-SHARED-EXPORTS: "-bnoentry"
826 // CHECK-LD64-SHARED-EXPORTS: "-b64"
827 // CHECK-LD64-SHARED-EXPORTS: "-bpT:0x100000000" "-bpD:0x110000000"
828 // CHECK-LD64-SHARED-EXPORTS-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
829 // CHECK-LD64-SHARED-EXPORTS-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
830 // CHECK-LD64-SHARED-EXPORTS: "-b{{(" ")?}}E:input.exp"
831 // CHECK-LD64-SHARED-EXPORTS-NOT: "-bE:{{[^"]+}}"
832 // CHECK-LD64-SHARED-EXPORTS: "-lc++"
833 // CHECK-LD64-SHARED-EXPORTS: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
834 // CHECK-LD64-SHARED-EXPORTS: "-lm"
835 // CHECK-LD64-SHARED-EXPORTS: "-lc"
837 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared with alternate export list.
838 // RUN: %clangxx -x c++ %s 2>&1 -### \
839 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
840 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
841 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
842 // RUN: -Wl,-bexport:input.exp \
843 // RUN: | FileCheck --check-prefix=CHECK-LD64-SHARED-EXPORTS-ALT %s
845 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared with alternate export list (no -Wl, variant).
846 // RUN: %clangxx -x c++ %s 2>&1 -### \
847 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
848 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
849 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
850 // RUN: -bexport:input.exp \
851 // RUN: | FileCheck --check-prefix=CHECK-LD64-SHARED-EXPORTS-ALT %s
853 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared with alternate export list (-Xlinker variant).
854 // RUN: %clangxx -x c++ %s 2>&1 -### \
855 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
856 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
857 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
858 // RUN: -Xlinker -bexport:input.exp \
859 // RUN: | FileCheck --check-prefix=CHECK-LD64-SHARED-EXPORTS-ALT %s
861 // CHECK-LD64-SHARED-EXPORTS-ALT: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
862 // CHECK-LD64-SHARED-EXPORTS-ALT: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
863 // CHECK-LD64-SHARED-EXPORTS-ALT: "-isysroot" "[[SYSROOT:[^"]+]]"
864 // CHECK-LD64-SHARED-EXPORTS-ALT-NOT: "{{.*}}llvm-nm"
865 // CHECK-LD64-SHARED-EXPORTS-ALT-NOT: "-X"
866 // CHECK-LD64-SHARED-EXPORTS-ALT-NOT: "64"
867 // CHECK-LD64-SHARED-EXPORTS-ALT: "{{.*}}ld{{(.exe)?}}"
868 // CHECK-LD64-SHARED-EXPORTS-ALT: "-bM:SRE"
869 // CHECK-LD64-SHARED-EXPORTS-ALT: "-bnoentry"
870 // CHECK-LD64-SHARED-EXPORTS-ALT: "-b64"
871 // CHECK-LD64-SHARED-EXPORTS-ALT: "-bpT:0x100000000" "-bpD:0x110000000"
872 // CHECK-LD64-SHARED-EXPORTS-ALT-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
873 // CHECK-LD64-SHARED-EXPORTS-ALT-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
874 // CHECK-LD64-SHARED-EXPORTS-ALT: "-b{{(" ")?}}export:input.exp"
875 // CHECK-LD64-SHARED-EXPORTS-ALT-NOT: "-bE:{{[^"]+}}"
876 // CHECK-LD64-SHARED-EXPORTS-ALT: "-lc++"
877 // CHECK-LD64-SHARED-EXPORTS-ALT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
878 // CHECK-LD64-SHARED-EXPORTS-ALT: "-lm"
879 // CHECK-LD64-SHARED-EXPORTS-ALT: "-lc"
881 // Check powerpc-ibm-aix7.3.0.0, -fprofile-generate
882 // RUN: %clang %s -### 2>&1 \
883 // RUN: -resource-dir=%S/Inputs/resource_dir \
884 // RUN: -static \
885 // RUN: -fprofile-generate\
886 // RUN: --target=powerpc-ibm-aix7.3.0.0 \
887 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
888 // RUN: --unwindlib=libunwind \
889 // RUN: | FileCheck --check-prefix=CHECK-PGO-NON-LTO %s
890 // CHECK-PGO-NON-LTO-NOT: warning:
891 // CHECK-PGO-NON-LTO: "-cc1" "-triple" "powerpc-ibm-aix7.3.0.0"
892 // CHECK-PGO-NON-LTO: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
893 // CHECK-PGO-NON-LTO: "-isysroot" "[[SYSROOT:[^"]+]]"
894 // CHECK-PGO-NON-LTO: "{{.*}}ld{{(.exe)?}}"
895 // CHECK-PGO-NON-LTO: "-bdbg:namedsects:ss"
896 // CHECK-PGO-NON-LTO: "-b32"
897 // CHECK-PGO-NON-LTO: "-bpT:0x10000000" "-bpD:0x20000000"
898 // CHECK-PGO-NON-LTO: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
899 // CHECK-PGO-NON-LTO-NOT: "-lc++"
900 // CHECK-PGO-NON-LTO-NOT: "-lc++abi"
901 // CHECK-PGO-NON-LTO: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
902 // CHECK-PGO-NON-LTO-NOT: "--as-needed"
903 // CHECK-PGO-NON-LTO-NOT: "-lunwind"
904 // CHECK-PGO-NON-LTO-NOT: "--no-as-needed"
905 // CHECK-PGO-NON-LTO-NOT: "-lm"
906 // CHECK-PGO-NON-LTO: "-lc"
908 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared with -bexpall.
909 // RUN: %clangxx -x c++ %s 2>&1 -### \
910 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
911 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
912 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
913 // RUN: -Wl,-bexpall \
914 // RUN: | FileCheck --check-prefix=CHECK-LD64-SHARED-EXPALL %s
916 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared with -bexpall (no -Wl, variant).
917 // RUN: %clangxx -x c++ %s 2>&1 -### \
918 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
919 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
920 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
921 // RUN: -bexpall \
922 // RUN: | FileCheck --check-prefix=CHECK-LD64-SHARED-EXPALL %s
924 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared with -bexpall (-Xlinker variant).
925 // RUN: %clangxx -x c++ %s 2>&1 -### \
926 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
927 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
928 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
929 // RUN: -Xlinker -bexpall \
930 // RUN: | FileCheck --check-prefix=CHECK-LD64-SHARED-EXPALL %s
932 // CHECK-LD64-SHARED-EXPALL: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
933 // CHECK-LD64-SHARED-EXPALL: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
934 // CHECK-LD64-SHARED-EXPALL: "-isysroot" "[[SYSROOT:[^"]+]]"
935 // CHECK-LD64-SHARED-EXPALL-NOT: "{{.*}}llvm-nm"
936 // CHECK-LD64-SHARED-EXPALL-NOT: "-X"
937 // CHECK-LD64-SHARED-EXPALL-NOT: "64"
938 // CHECK-LD64-SHARED-EXPALL: "{{.*}}ld{{(.exe)?}}"
939 // CHECK-LD64-SHARED-EXPALL: "-bM:SRE"
940 // CHECK-LD64-SHARED-EXPALL: "-bnoentry"
941 // CHECK-LD64-SHARED-EXPALL: "-b64"
942 // CHECK-LD64-SHARED-EXPALL: "-bpT:0x100000000" "-bpD:0x110000000"
943 // CHECK-LD64-SHARED-EXPALL-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
944 // CHECK-LD64-SHARED-EXPALL-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
945 // CHECK-LD64-SHARED-EXPALL: "-b{{(" ")?}}expall"
946 // CHECK-LD64-SHARED-EXPALL-NOT: "-bE:{{[^"]+}}"
947 // CHECK-LD64-SHARED-EXPALL: "-lc++"
948 // CHECK-LD64-SHARED-EXPALL: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
949 // CHECK-LD64-SHARED-EXPALL: "-lm"
950 // CHECK-LD64-SHARED-EXPALL: "-lc"
952 // Check powerpc-ibm-aix7.2.5.3, -fprofile-generate, -flto
953 // RUN: %clang %s -### 2>&1 \
954 // RUN: -resource-dir=%S/Inputs/resource_dir \
955 // RUN: -static \
956 // RUN: -fprofile-generate\
957 // RUN: -flto\
958 // RUN: --target=powerpc-ibm-aix7.2.5.3 \
959 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
960 // RUN: --unwindlib=libunwind \
961 // RUN: | FileCheck --check-prefix=CHECK-PGO-LTO %s
962 // CHECK-PGO-LTO-NOT: warning:
963 // CHECK-PGO-LTO: "-cc1" "-triple" "powerpc-ibm-aix7.2.5.3"
964 // CHECK-PGO-LTO: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
965 // CHECK-PGO-LTO: "-isysroot" "[[SYSROOT:[^"]+]]"
966 // CHECK-PGO-LTO: "{{.*}}ld{{(.exe)?}}"
967 // CHECK-PGO-LTO: "-bdbg:namedsects:ss"
968 // CHECK-PGO-LTO: "-b32"
969 // CHECK-PGO-LTO: "-bpT:0x10000000" "-bpD:0x20000000"
970 // CHECK-PGO-LTO: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
971 // CHECK-PGO-LTO-NOT: "-lc++"
972 // CHECK-PGO-LTO-NOT: "-lc++abi"
973 // CHECK-PGO-LTO: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
974 // CHECK-PGO-LTO-NOT: "--as-needed"
975 // CHECK-PGO-LTO-NOT: "-lunwind"
976 // CHECK-PGO-LTO-NOT: "--no-as-needed"
977 // CHECK-PGO-LTO-NOT: "-lm"
978 // CHECK-PGO-LTO: "-lc"
980 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared with -bexpfull (no -Wl, variant).
981 // RUN: %clangxx -x c++ %s 2>&1 -### \
982 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
983 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
984 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
985 // RUN: -Wl,-bexpfull \
986 // RUN: | FileCheck --check-prefix=CHECK-LD64-SHARED-EXPFULL %s
988 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared with -bexpfull (no -Wl, variant).
989 // RUN: %clangxx -x c++ %s 2>&1 -### \
990 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
991 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
992 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
993 // RUN: -bexpfull \
994 // RUN: | FileCheck --check-prefix=CHECK-LD64-SHARED-EXPFULL %s
996 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared with -bexpfull (-Xlinker variant).
997 // RUN: %clangxx -x c++ %s 2>&1 -### \
998 // RUN: -resource-dir=%S/Inputs/resource_dir -shared \
999 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
1000 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
1001 // RUN: -Xlinker -bexpfull \
1002 // RUN: | FileCheck --check-prefix=CHECK-LD64-SHARED-EXPFULL %s
1004 // CHECK-LD64-SHARED-EXPFULL: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
1005 // CHECK-LD64-SHARED-EXPFULL: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
1006 // CHECK-LD64-SHARED-EXPFULL: "-isysroot" "[[SYSROOT:[^"]+]]"
1007 // CHECK-LD64-SHARED-EXPFULL-NOT: "{{.*}}llvm-nm"
1008 // CHECK-LD64-SHARED-EXPFULL-NOT: "-X"
1009 // CHECK-LD64-SHARED-EXPFULL-NOT: "64"
1010 // CHECK-LD64-SHARED-EXPFULL: "{{.*}}ld{{(.exe)?}}"
1011 // CHECK-LD64-SHARED-EXPFULL: "-bM:SRE"
1012 // CHECK-LD64-SHARED-EXPFULL: "-bnoentry"
1013 // CHECK-LD64-SHARED-EXPFULL: "-b64"
1014 // CHECK-LD64-SHARED-EXPFULL: "-bpT:0x100000000" "-bpD:0x110000000"
1015 // CHECK-LD64-SHARED-EXPFULL-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
1016 // CHECK-LD64-SHARED-EXPFULL-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
1017 // CHECK-LD64-SHARED-EXPFULL: "-b{{(" ")?}}expfull"
1018 // CHECK-LD64-SHARED-EXPFULL-NOT: "-bE:{{[^"]+}}"
1019 // CHECK-LD64-SHARED-EXPFULL: "-lc++"
1020 // CHECK-LD64-SHARED-EXPFULL: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
1021 // CHECK-LD64-SHARED-EXPFULL: "-lm"
1022 // CHECK-LD64-SHARED-EXPFULL: "-lc"
1024 // Check powerpc-ibm-aix7.1.0.0. -fopenmp=libomp to specify libomp explicitly.
1025 // RUN: %clang %s -### 2>&1 \
1026 // RUN: -resource-dir=%S/Inputs/resource_dir \
1027 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
1028 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
1029 // RUN: --unwindlib=libunwind \
1030 // RUN: -fopenmp=libomp \
1031 // RUN: | FileCheck --check-prefixes=CHECK-FOPENMP,CHECK-FOPENMP-OMP %s
1033 // Check powerpc-ibm-aix7.1.0.0. -fopenmp=libiomp5 to specify libgomp explicitly.
1034 // RUN: %clang %s -### 2>&1 \
1035 // RUN: -resource-dir=%S/Inputs/resource_dir \
1036 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
1037 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
1038 // RUN: --unwindlib=libunwind \
1039 // RUN: -fopenmp=libiomp5 \
1040 // RUN: | FileCheck --check-prefixes=CHECK-FOPENMP,CHECK-FOPENMP-IOMP5 %s
1042 // Check powerpc-ibm-aix7.1.0.0. -fopenmp=libgomp to specify libgomp explicitly.
1043 // RUN: %clang %s -### 2>&1 \
1044 // RUN: -resource-dir=%S/Inputs/resource_dir \
1045 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
1046 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
1047 // RUN: --unwindlib=libunwind \
1048 // RUN: -fopenmp=libgomp \
1049 // RUN: | FileCheck --check-prefixes=CHECK-FOPENMP,CHECK-FOPENMP-GOMP %s
1051 // CHECK-FOPENMP-NOT: warning:
1052 // CHECK-FOPENMP: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
1053 // CHECK-FOPENMP: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
1054 // CHECK-FOPENMP: "-isysroot" "[[SYSROOT:[^"]+]]"
1055 // CHECK-FOPENMP: "{{.*}}ld{{(.exe)?}}"
1056 // CHECK-FOPENMP-NOT: "-bnso"
1057 // CHECK-FOPENMP: "-b32"
1058 // CHECK-FOPENMP: "-bpT:0x10000000" "-bpD:0x20000000"
1059 // CHECK-FOPENMP: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
1060 // CHECK-FOPENMP: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
1061 // CHECK-FOPENMP-NOT: "-lc++"
1062 // CHECK-FOPENMP-NOT: "-lc++abi"
1063 // CHECK-FOPENMP: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
1064 // CHECK-FOPENMP-NOT: "--as-needed"
1065 // CHECK-FOPENMP: "-lunwind"
1066 // CHECK-FOPENMP-NOT: "--no-as-needed"
1067 // CHECK-FOPENMP-NOT: "-lm"
1068 // CHECK-FOPENMP-OMP: "-lomp"
1069 // CHECK-FOPENMP-IOMP5: "-liomp5"
1070 // CHECK-FOPENMP-GOMP: "-lgomp"
1071 // CHECK-FOPENMP: "-lc"
1073 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -fopenmp=libfoo results an error.
1074 // RUN: not %clang %s 2>&1 -### \
1075 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
1076 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
1077 // RUN: -fopenmp=libfoo \
1078 // RUN: | FileCheck --check-prefixes=CHECK-FOPENMP-FOO %s
1079 // CHECK-FOPENMP-FOO: error: unsupported argument 'libfoo' to option '-fopenmp='
1081 // Check powerpc-ibm-aix7.1.0.0. -r does not link object files or libraries
1082 // RUN: %clang %s 2>&1 -### \
1083 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
1084 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
1085 // RUN: --unwindlib=libunwind \
1086 // RUN: -L/foo/bar \
1087 // RUN: -r \
1088 // RUN: | FileCheck --check-prefixes=CHECK-RELOCATABLE %s
1090 // CHECK-RELOCATABLE: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
1091 // CHECK-RELOCATABLE: "-isysroot" "[[SYSROOT:[^"]+]]"
1092 // CHECK-RELOCATABLE: "{{.*}}ld{{(.exe)?}}"
1093 // CHECK-RELOCATABLE: "-r"
1094 // CHECK-RELOCATABLE: "-L/foo/bar"
1095 // CHECK-RELOCATABLE-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
1096 // CHECK-RELOCATABLE-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
1097 // CHECK-RELOCATABLE-NOT: "-l{{.*}}"
1098 // CHECK-RELOCATABLE-NOT: "-L{{.*}}"
1100 // Check powerpc-ibm-aix7.1.0.0. -K is a passthrough linker option.
1101 // RUN: %clang %s 2>&1 -### \
1102 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
1103 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
1104 // RUN: --unwindlib=libunwind \
1105 // RUN: -K \
1106 // RUN: | FileCheck --check-prefixes=CHECK-K %s
1107 // CHECK-K: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
1108 // CHECK-K: "-isysroot" "[[SYSROOT:[^"]+]]"
1109 // CHECK-K: "{{.*}}ld{{(.exe)?}}"
1110 // CHECK-K: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
1111 // CHECK-K: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
1112 // CHECK-K: "-K"
1114 // Check powerpc-ibm-aix7.1.0.0. -K unused when not linking.
1115 // RUN: %clang %s 2>&1 -### \
1116 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
1117 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
1118 // RUN: --unwindlib=libunwind \
1119 // RUN: -K \
1120 // RUN: -c \
1121 // RUN: | FileCheck --check-prefixes=CHECK-K-UNUSED %s
1122 // CHECK-K-UNUSED: clang: warning: -K: 'linker' input unused [-Wunused-command-line-argument]