[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Driver / aix-ld.c
blob3f4784daa1e3eb25c04ad1a4b539e621fe474c8f
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"
139 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. Enable g-profiling.
140 // RUN: %clang %s -### 2>&1 \
141 // RUN: -resource-dir=%S/Inputs/resource_dir \
142 // RUN: -pg \
143 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
144 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
145 // RUN: --unwindlib=libunwind \
146 // RUN: | FileCheck --check-prefix=CHECK-LD64-GPROF %s
147 // CHECK-LD64-GPROF-NOT: warning:
148 // CHECK-LD64-GPROF: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
149 // CHECK-LD64-GPROF: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
150 // CHECK-LD64-GPROF: "-isysroot" "[[SYSROOT:[^"]+]]"
151 // CHECK-LD64-GPROF: "{{.*}}ld{{(.exe)?}}"
152 // CHECK-LD64-GPROF-NOT: "-bnso"
153 // CHECK-LD64-GPROF: "-b64"
154 // CHECK-LD64-GPROF: "-bpT:0x100000000" "-bpD:0x110000000"
155 // CHECK-LD64-GPROF: "[[SYSROOT]]/usr/lib{{/|\\\\}}gcrt0_64.o"
156 // CHECK-LD64-GPROF: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
157 // CHECK-LD64-GPROF-NOT: "-lc++"
158 // CHECK-LD64-GPROF-NOT: "-lc++abi"
159 // CHECK-LD64-GPROF: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
160 // CHECK-LD64-GPROF-NOT: "--as-needed"
161 // CHECK-LD64-GPROF: "-lunwind"
162 // CHECK-LD64-GPROF-NOT: "--no-as-needed"
163 // CHECK-LD64-GPROF-NOT: "-lm"
164 // CHECK-LD64-GPROF: "-lc"
166 // Check powerpc-ibm-aix7.1.0.0, 32-bit. Static linking.
167 // RUN: %clang %s -### 2>&1 \
168 // RUN: -resource-dir=%S/Inputs/resource_dir \
169 // RUN: -static \
170 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
171 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
172 // RUN: --unwindlib=libunwind \
173 // RUN: | FileCheck --check-prefix=CHECK-LD32-STATIC %s
174 // CHECK-LD32-STATIC-NOT: warning:
175 // CHECK-LD32-STATIC: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
176 // CHECK-LD32-STATIC: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
177 // CHECK-LD32-STATIC: "-isysroot" "[[SYSROOT:[^"]+]]"
178 // CHECK-LD32-STATIC: "{{.*}}ld{{(.exe)?}}"
179 // CHECK-LD32-STATIC: "-bnso"
180 // CHECK-LD32-STATIC: "-b32"
181 // CHECK-LD32-STATIC: "-bpT:0x10000000" "-bpD:0x20000000"
182 // CHECK-LD32-STATIC: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
183 // CHECK-LD32-STATIC: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
184 // CHECK-LD32-STATIC-NOT: "-lc++"
185 // CHECK-LD32-STATIC-NOT: "-lc++abi"
186 // CHECK-LD32-STATIC: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
187 // CHECK-LD32-STATIC-NOT: "--as-needed"
188 // CHECK-LD32-STATIC-NOT: "-lunwind"
189 // CHECK-LD32-STATIC-NOT: "--no-as-needed"
190 // CHECK-LD32-STATIC-NOT: "-lm"
191 // CHECK-LD32-STATIC: "-lc"
193 // Check powerpc-ibm-aix7.1.0.0, 32-bit. Library search path.
194 // RUN: %clang %s -### 2>&1 \
195 // RUN: -resource-dir=%S/Inputs/resource_dir \
196 // RUN: -L%S/Inputs/aix_ppc_tree/powerpc-ibm-aix7.1.0.0 \
197 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
198 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
199 // RUN: --unwindlib=libunwind \
200 // RUN: | FileCheck --check-prefix=CHECK-LD32-LIBP %s
201 // CHECK-LD32-LIBP-NOT: warning:
202 // CHECK-LD32-LIBP: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
203 // CHECK-LD32-LIBP: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
204 // CHECK-LD32-LIBP: "-isysroot" "[[SYSROOT:[^"]+]]"
205 // CHECK-LD32-LIBP: "{{.*}}ld{{(.exe)?}}"
206 // CHECK-LD32-LIBP-NOT: "-bnso"
207 // CHECK-LD32-LIBP: "-b32"
208 // CHECK-LD32-LIBP: "-bpT:0x10000000" "-bpD:0x20000000"
209 // CHECK-LD32-LIBP: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
210 // CHECK-LD32-LIBP: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
211 // CHECK-LD32-LIBP: "-L[[SYSROOT]]/powerpc-ibm-aix7.1.0.0"
212 // CHECK-LD32-LIBP-NOT: "-lc++"
213 // CHECK-LD32-LIBP-NOT: "-lc++abi"
214 // CHECK-LD32-LIBP: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
215 // CHECK-LD32-LIBP-NOT: "--as-needed"
216 // CHECK-LD32-LIBP: "-lunwind"
217 // CHECK-LD32-LIBP-NOT: "--no-as-needed"
218 // CHECK-LD32-LIBP-NOT: "-lm"
219 // CHECK-LD32-LIBP: "-lc"
221 // Check powerpc-ibm-aix7.1.0.0, 32-bit. nostdlib.
222 // RUN: %clang %s -### 2>&1 \
223 // RUN: -resource-dir=%S/Inputs/resource_dir \
224 // RUN: -nostdlib \
225 // RUN: -pthread \
226 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
227 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
228 // RUN: | FileCheck --check-prefix=CHECK-LD32-NO-STD-LIB %s
229 // CHECK-LD32-NO-STD-LIB-NOT: warning:
230 // CHECK-LD32-NO-STD-LIB: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
231 // CHECK-LD32-NO-STD-LIB: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
232 // CHECK-LD32-NO-STD-LIB: "-isysroot" "[[SYSROOT:[^"]+]]"
233 // CHECK-LD32-NO-STD-LIB: "{{.*}}ld{{(.exe)?}}"
234 // CHECK-LD32-NO-STD-LIB-NOT: "-bnso"
235 // CHECK-LD32-NO-STD-LIB: "-b32"
236 // CHECK-LD32-NO-STD-LIB: "-bpT:0x10000000" "-bpD:0x20000000"
237 // CHECK-LD32-NO-STD-LIB-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
238 // CHECK-LD32-NO-STD-LIB-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
239 // CHECK-LD32-NO-STD-LIB-NOT: "-lc++"
240 // CHECK-LD32-NO-STD-LIB-NOT: "-lc++abi"
241 // CHECK-LD32-NO-STD-LIB-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
242 // CHECK-LD32-NO-STD-LIB-NOT: "--as-needed"
243 // CHECK-LD32-NO-STD-LIB-NOT: "-lunwind"
244 // CHECK-LD32-NO-STD-LIB-NOT: "--no-as-needed"
245 // CHECK-LD32-NO-STD-LIB-NOT: "-lpthreads"
246 // CHECK-LD32-NO-STD-LIB-NOT: "-lm"
247 // CHECK-LD32-NO-STD-LIB-NOT: "-lc"
249 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. nodefaultlibs.
250 // RUN: %clang %s -### 2>&1 \
251 // RUN: -resource-dir=%S/Inputs/resource_dir \
252 // RUN: -nodefaultlibs \
253 // RUN: -pthread \
254 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
255 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
256 // RUN: | FileCheck --check-prefix=CHECK-LD64-NO-DEFAULT-LIBS %s
257 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: warning:
258 // CHECK-LD64-NO-DEFAULT-LIBS: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
259 // CHECK-LD64-NO-DEFAULT-LIBS: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
260 // CHECK-LD64-NO-DEFAULT-LIBS: "-isysroot" "[[SYSROOT:[^"]+]]"
261 // CHECK-LD64-NO-DEFAULT-LIBS: "{{.*}}ld{{(.exe)?}}"
262 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-bnso"
263 // CHECK-LD64-NO-DEFAULT-LIBS: "-b64"
264 // CHECK-LD64-NO-DEFAULT-LIBS: "-bpT:0x100000000" "-bpD:0x110000000"
265 // CHECK-LD64-NO-DEFAULT-LIBS: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
266 // CHECK-LD64-NO-DEFAULT-LIBS: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
267 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lc++"
268 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lc++abi"
269 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
270 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "--as-needed"
271 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lunwind"
272 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "--no-as-needed"
273 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lpthreads"
274 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lm"
275 // CHECK-LD64-NO-DEFAULT-LIBS-NOT: "-lc"
277 // Check powerpc-ibm-aix7.1.0.0, 32-bit. 'bcdtors' and argument order.
278 // RUN: %clang %s 2>&1 -### \
279 // RUN: -resource-dir=%S/Inputs/resource_dir \
280 // RUN: -Wl,-bnocdtors \
281 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
282 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
283 // RUN: --unwindlib=libunwind \
284 // RUN: | FileCheck --check-prefix=CHECK-LD32-ARG-ORDER %s
285 // CHECK-LD32-ARG-ORDER: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
286 // CHECK-LD32-ARG-ORDER: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
287 // CHECK-LD32-ARG-ORDER: "-isysroot" "[[SYSROOT:[^"]+]]"
288 // CHECK-LD32-ARG-ORDER: "{{.*}}ld{{(.exe)?}}"
289 // CHECK-LD32-ARG-ORDER-NOT: "-bnso"
290 // CHECK-LD32-ARG-ORDER: "-b32"
291 // CHECK-LD32-ARG-ORDER: "-bpT:0x10000000" "-bpD:0x20000000"
292 // CHECK-LD32-ARG-ORDER: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
293 // CHECK-LD32-ARG-ORDER: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
294 // CHECK-LD32-ARG-ORDER: "-bcdtors:all:0:s"
295 // CHECK-LD32-ARG-ORDER: "-bnocdtors"
296 // CHECK-LD32-ARG-ORDER-NOT: "-bcdtors:all:0:s"
297 // CHECK-LD32-ARG-ORDER-NOT: "-lc++"
298 // CHECK-LD32-ARG-ORDER-NOT: "-lc++abi"
299 // CHECK-LD32-ARG-ORDER: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
300 // CHECK-LD32-ARG-ORDER-NOT: "--as-needed"
301 // CHECK-LD32-ARG-ORDER: "-lunwind"
302 // CHECK-LD32-ARG-ORDER-NOT: "--no-as-needed"
303 // CHECK-LD32-ARG-ORDER-NOT: "-lm"
304 // CHECK-LD32-ARG-ORDER: "-lc"
306 // Check powerpc-ibm-aix7.1.0.0, 32-bit. 'bcdtors' and argument order.
307 // RUN: %clangxx %s 2>&1 -### \
308 // RUN: -resource-dir=%S/Inputs/resource_dir \
309 // RUN: -Wl,-bnocdtors \
310 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
311 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
312 // RUN: --unwindlib=libunwind \
313 // RUN: | FileCheck --check-prefix=CHECK-LD32-CXX-ARG-ORDER %s
314 // CHECK-LD32-CXX-ARG-ORDER: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
315 // CHECK-LD32-CXX-ARG-ORDER: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
316 // CHECK-LD32-CXX-ARG-ORDER: "-isysroot" "[[SYSROOT:[^"]+]]"
317 // CHECK-LD32-CXX-ARG-ORDER: "{{.*}}ld{{(.exe)?}}"
318 // CHECK-LD32-CXX-ARG-ORDER-NOT: "-bnso"
319 // CHECK-LD32-CXX-ARG-ORDER: "-b32"
320 // CHECK-LD32-CXX-ARG-ORDER: "-bpT:0x10000000" "-bpD:0x20000000"
321 // CHECK-LD32-CXX-ARG-ORDER: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
322 // CHECK-LD32-CXX-ARG-ORDER: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
323 // CHECK-LD32-CXX-ARG-ORDER: "-bcdtors:all:0:s"
324 // CHECK-LD32-CXX-ARG-ORDER: "-bnocdtors"
325 // CHECK-LD32-CXX-ARG-ORDER-NOT: "-bcdtors:all:0:s"
326 // CHECK-LD32-CXX-ARG-ORDER: "-lc++"
327 // CHECK-LD32-CXX-ARG-ORDER: "-lc++abi"
328 // CHECK-LD32-CXX-ARG-ORDER: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
329 // CHECK-LD32-CXX-ARG-ORDER-NOT: "--as-needed"
330 // CHECK-LD32-CXX-ARG-ORDER: "-lunwind"
331 // CHECK-LD32-CXX-ARG-ORDER-NOT: "--no-as-needed"
332 // CHECK-LD32-CXX-ARG-ORDER: "-lm"
333 // CHECK-LD32-CXX-ARG-ORDER: "-lc"
335 // Check powerpc-ibm-aix7.1.0.0, 32-bit. lc++ and lc order.
336 // RUN: %clangxx %s 2>&1 -### \
337 // RUN: -resource-dir=%S/Inputs/resource_dir \
338 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
339 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
340 // RUN: --unwindlib=libunwind \
341 // RUN: | FileCheck --check-prefix=CHECK-LD32-CXX-ARG-LCXX %s
342 // CHECK-LD32-CXX-ARG-LCXX: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
343 // CHECK-LD32-CXX-ARG-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
344 // CHECK-LD32-CXX-ARG-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
345 // CHECK-LD32-CXX-ARG-LCXX: "{{.*}}ld{{(.exe)?}}"
346 // CHECK-LD32-CXX-ARG-LCXX: "-b32"
347 // CHECK-LD32-CXX-ARG-LCXX: "-bpT:0x10000000" "-bpD:0x20000000"
348 // CHECK-LD32-CXX-ARG-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
349 // CHECK-LD32-CXX-ARG-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
350 // CHECK-LD32-CXX-ARG-LCXX: "-lc++"
351 // CHECK-LD32-CXX-ARG-LCXX: "-lc++abi"
352 // CHECK-LD32-CXX-ARG-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
353 // CHECK-LD32-CXX-ARG-LCXX-NOT: "--as-needed"
354 // CHECK-LD32-CXX-ARG-LCXX: "-lunwind"
355 // CHECK-LD32-CXX-ARG-LCXX-NOT: "--no-as-needed"
356 // CHECK-LD32-CXX-ARG-LCXX: "-lm"
357 // CHECK-LD32-CXX-ARG-LCXX: "-lc"
359 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. lc++ and lc order.
360 // RUN: %clangxx %s 2>&1 -### \
361 // RUN: -resource-dir=%S/Inputs/resource_dir \
362 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
363 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
364 // RUN: --unwindlib=libunwind \
365 // RUN: | FileCheck --check-prefix=CHECK-LD64-CXX-ARG-LCXX %s
366 // CHECK-LD64-CXX-ARG-LCXX: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
367 // CHECK-LD64-CXX-ARG-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
368 // CHECK-LD64-CXX-ARG-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
369 // CHECK-LD64-CXX-ARG-LCXX: "{{.*}}ld{{(.exe)?}}"
370 // CHECK-LD64-CXX-ARG-LCXX: "-b64"
371 // CHECK-LD64-CXX-ARG-LCXX: "-bpT:0x100000000" "-bpD:0x110000000"
372 // CHECK-LD64-CXX-ARG-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
373 // CHECK-LD64-CXX-ARG-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
374 // CHECK-LD64-CXX-ARG-LCXX: "-lc++"
375 // CHECK-LD64-CXX-ARG-LCXX: "-lc++abi"
376 // CHECK-LD64-CXX-ARG-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
377 // CHECK-LD64-CXX-ARG-LCXX-NOT: "--as-needed"
378 // CHECK-LD64-CXX-ARG-LCXX: "-lunwind"
379 // CHECK-LD64-CXX-ARG-LCXX-NOT: "--no-as-needed"
380 // CHECK-LD64-CXX-ARG-LCXX: "-lm"
381 // CHECK-LD64-CXX-ARG-LCXX: "-lc"
383 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -nodefaultlibs.
384 // RUN: %clangxx %s 2>&1 -### \
385 // RUN: -resource-dir=%S/Inputs/resource_dir \
386 // RUN: -nodefaultlibs \
387 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
388 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
389 // RUN: --unwindlib=libunwind \
390 // RUN: | FileCheck --check-prefix=CHECK-LD32-NODEFLIB-LCXX %s
391 // CHECK-LD32-NODEFLIB-LCXX: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
392 // CHECK-LD32-NODEFLIB-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
393 // CHECK-LD32-NODEFLIB-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
394 // CHECK-LD32-NODEFLIB-LCXX: "{{.*}}ld{{(.exe)?}}"
395 // CHECK-LD32-NODEFLIB-LCXX: "-b32"
396 // CHECK-LD32-NODEFLIB-LCXX: "-bpT:0x10000000" "-bpD:0x20000000"
397 // CHECK-LD32-NODEFLIB-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
398 // CHECK-LD32-NODEFLIB-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
399 // CHECK-LD32-NODEFLIB-LCXX-NOT: "-lc++"
400 // CHECK-LD32-NODEFLIB-LCXX-NOT: "-lc++abi"
401 // CHECK-LD32-NODEFLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
402 // CHECK-LD32-NODEFLIB-LCXX-NOT: "--as-needed"
403 // CHECK-LD32-NODEFLIB-LCXX-NOT: "-lunwind"
404 // CHECK-LD32-NODEFLIB-LCXX-NOT: "--no-as-needed"
405 // CHECK-LD32-NODEFLIB-LCXX-NOT: "-lm"
406 // CHECK-LD32-NODEFLIB-LCXX-NOT: "-lc"
408 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -nodefaultlibs.
409 // RUN: %clangxx %s 2>&1 -### \
410 // RUN: -resource-dir=%S/Inputs/resource_dir \
411 // RUN: -nodefaultlibs \
412 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
413 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
414 // RUN: --unwindlib=libunwind \
415 // RUN: | FileCheck --check-prefix=CHECK-LD64-NODEFLIB-LCXX %s
416 // CHECK-LD64-NODEFLIB-LCXX: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
417 // CHECK-LD64-NODEFLIB-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
418 // CHECK-LD64-NODEFLIB-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
419 // CHECK-LD64-NODEFLIB-LCXX: "{{.*}}ld{{(.exe)?}}"
420 // CHECK-LD64-NODEFLIB-LCXX: "-b64"
421 // CHECK-LD64-NODEFLIB-LCXX: "-bpT:0x100000000" "-bpD:0x110000000"
422 // CHECK-LD64-NODEFLIB-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
423 // CHECK-LD64-NODEFLIB-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
424 // CHECK-LD64-NODEFLIB-LCXX-NOT: "-lc++"
425 // CHECK-LD64-NODEFLIB-LCXX-NOT: "-lc++abi"
426 // CHECK-LD64-NODEFLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
427 // CHECK-LD64-NODEFLIB-LCXX-NOT: "--as-needed"
428 // CHECK-LD64-NODEFLIB-LCXX-NOT: "-lunwind"
429 // CHECK-LD64-NODEFLIB-LCXX-NOT: "--no-as-needed"
430 // CHECK-LD64-NODEFLIB-LCXX-NOT: "-lm"
431 // CHECK-LD64-NODEFLIB-LCXX-NOT: "-lc"
433 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -nostdlib.
434 // RUN: %clangxx %s 2>&1 -### \
435 // RUN: -resource-dir=%S/Inputs/resource_dir \
436 // RUN: -nostdlib \
437 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
438 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
439 // RUN: --unwindlib=libunwind \
440 // RUN: | FileCheck --check-prefix=CHECK-LD32-NOSTDLIB-LCXX %s
441 // CHECK-LD32-NOSTDLIB-LCXX: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
442 // CHECK-LD32-NOSTDLIB-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
443 // CHECK-LD32-NOSTDLIB-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
444 // CHECK-LD32-NOSTDLIB-LCXX: "{{.*}}ld{{(.exe)?}}"
445 // CHECK-LD32-NOSTDLIB-LCXX: "-b32"
446 // CHECK-LD32-NOSTDLIB-LCXX: "-bpT:0x10000000" "-bpD:0x20000000"
447 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
448 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
449 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lc++"
450 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lc++abi"
451 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
452 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "--as-needed"
453 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lunwind"
454 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "--no-as-needed"
455 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lm"
456 // CHECK-LD32-NOSTDLIB-LCXX-NOT: "-lc"
458 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -nostdlib.
459 // RUN: %clangxx %s 2>&1 -### \
460 // RUN: -resource-dir=%S/Inputs/resource_dir \
461 // RUN: -nostdlib \
462 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
463 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
464 // RUN: --unwindlib=libunwind \
465 // RUN: | FileCheck --check-prefix=CHECK-LD64-NOSTDLIB-LCXX %s
466 // CHECK-LD64-NOSTDLIB-LCXX: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
467 // CHECK-LD64-NOSTDLIB-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
468 // CHECK-LD64-NOSTDLIB-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
469 // CHECK-LD64-NOSTDLIB-LCXX: "{{.*}}ld{{(.exe)?}}"
470 // CHECK-LD64-NOSTDLIB-LCXX: "-b64"
471 // CHECK-LD64-NOSTDLIB-LCXX: "-bpT:0x100000000" "-bpD:0x110000000"
472 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
473 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
474 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lc++"
475 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lc++abi"
476 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
477 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "--as-needed"
478 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lunwind"
479 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "--no-as-needed"
480 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lm"
481 // CHECK-LD64-NOSTDLIB-LCXX-NOT: "-lc"
483 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -nostdlib++.
484 // Note: crti is still linked for initialization/finalization functionality.
485 // RUN: %clangxx %s 2>&1 -### \
486 // RUN: -resource-dir=%S/Inputs/resource_dir \
487 // RUN: -nostdlib++ \
488 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
489 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
490 // RUN: --unwindlib=libunwind \
491 // RUN: | FileCheck --check-prefix=CHECK-LD32-NOSTDLIBXX-LCXX %s
492 // CHECK-LD32-NOSTDLIBXX-LCXX: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
493 // CHECK-LD32-NOSTDLIBXX-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
494 // CHECK-LD32-NOSTDLIBXX-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
495 // CHECK-LD32-NOSTDLIBXX-LCXX: "{{.*}}ld{{(.exe)?}}"
496 // CHECK-LD32-NOSTDLIBXX-LCXX: "-b32"
497 // CHECK-LD32-NOSTDLIBXX-LCXX: "-bpT:0x10000000" "-bpD:0x20000000"
498 // CHECK-LD32-NOSTDLIBXX-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
499 // CHECK-LD32-NOSTDLIBXX-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
500 // CHECK-LD32-NOSTDLIBXX-LCXX-NOT: "-lc++"
501 // CHECK-LD32-NOSTDLIBXX-LCXX-NOT: "-lc++abi"
502 // CHECK-LD32-NOSTDLIBXX-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
503 // CHECK-LD32-NOSTDLIBXX-LCXX-NOT: "--as-needed"
504 // CHECK-LD32-NOSTDLIBXX-LCXX: "-lunwind"
505 // CHECK-LD32-NOSTDLIBXX-LCXX-NOT: "--no-as-needed"
506 // CHECK-LD32-NOSTDLIBXX-LCXX: "-lm"
507 // CHECK-LD32-NOSTDLIBXX-LCXX: "-lc"
509 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -nostdlib++.
510 // RUN: %clangxx %s 2>&1 -### \
511 // RUN: -resource-dir=%S/Inputs/resource_dir \
512 // RUN: -nostdlib++ \
513 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
514 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
515 // RUN: --unwindlib=libunwind \
516 // RUN: | FileCheck --check-prefix=CHECK-LD64-NOSTDLIBXX-LCXX %s
517 // CHECK-LD64-NOSTDLIBXX-LCXX: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
518 // CHECK-LD64-NOSTDLIBXX-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
519 // CHECK-LD64-NOSTDLIBXX-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
520 // CHECK-LD64-NOSTDLIBXX-LCXX: "{{.*}}ld{{(.exe)?}}"
521 // CHECK-LD64-NOSTDLIBXX-LCXX: "-b64"
522 // CHECK-LD64-NOSTDLIBXX-LCXX: "-bpT:0x100000000" "-bpD:0x110000000"
523 // CHECK-LD64-NOSTDLIBXX-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
524 // CHECK-LD64-NOSTDLIBXX-LCXX: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
525 // CHECK-LD64-NOSTDLIBXX-LCXX-NOT: "-lc++"
526 // CHECK-LD64-NOSTDLIBXX-LCXX-NOT: "-lc++abi"
527 // CHECK-LD64-NOSTDLIBXX-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
528 // CHECK-LD64-NOSTDLIBXX-LCXX-NOT: "--as-needed"
529 // CHECK-LD64-NOSTDLIBXX-LCXX: "-lunwind"
530 // CHECK-LD64-NOSTDLIBXX-LCXX-NOT: "--no-as-needed"
531 // CHECK-LD64-NOSTDLIBXX-LCXX: "-lm"
532 // CHECK-LD64-NOSTDLIBXX-LCXX: "-lc"
534 // Check powerpc64-ibm-aix7.1.0.0, 32-bit. -nostartfiles.
535 // RUN: %clangxx %s 2>&1 -### \
536 // RUN: -resource-dir=%S/Inputs/resource_dir \
537 // RUN: -nostartfiles \
538 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
539 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
540 // RUN: --unwindlib=libunwind \
541 // RUN: | FileCheck --check-prefix=CHECK-LD32-NOSTARTFILES-LCXX %s
542 // CHECK-LD32-NOSTARTFILES-LCXX: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
543 // CHECK-LD32-NOSTARTFILES-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
544 // CHECK-LD32-NOSTARTFILES-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
545 // CHECK-LD32-NOSTARTFILES-LCXX: "{{.*}}ld{{(.exe)?}}"
546 // CHECK-LD32-NOSTARTFILES-LCXX: "-b32"
547 // CHECK-LD32-NOSTARTFILES-LCXX: "-bpT:0x10000000" "-bpD:0x20000000"
548 // CHECK-LD32-NOSTARTFILES-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
549 // CHECK-LD32-NOSTARTFILES-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
550 // CHECK-LD32-NOSTARTFILES-LCXX: "-lc++"
551 // CHECK-LD32-NOSTARTFILES-LCXX: "-lc++abi"
552 // CHECK-LD32-NOSTARTFILES-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
553 // CHECK-LD32-NOSTARTFILES-LCXX-NOT: "--as-needed"
554 // CHECK-LD32-NOSTARTFILES-LCXX: "-lunwind"
555 // CHECK-LD32-NOSTARTFILES-LCXX-NOT: "--no-as-needed"
556 // CHECK-LD32-NOSTARTFILES-LCXX: "-lm"
557 // CHECK-LD32-NOSTARTFILES-LCXX: "-lc"
559 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -nostartfiles.
560 // RUN: %clangxx %s 2>&1 -### \
561 // RUN: -resource-dir=%S/Inputs/resource_dir \
562 // RUN: -nostartfiles \
563 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
564 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
565 // RUN: --unwindlib=libunwind \
566 // RUN: | FileCheck --check-prefix=CHECK-LD32-NOSTARTFILES-LCXX %s
567 // CHECK-LD64-NOSTARTFILES-LCXX: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
568 // CHECK-LD64-NOSTARTFILES-LCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
569 // CHECK-LD64-NOSTARTFILES-LCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
570 // CHECK-LD64-NOSTARTFILES-LCXX: "{{.*}}ld{{(.exe)?}}"
571 // CHECK-LD64-NOSTARTFILES-LCXX: "-b64"
572 // CHECK-LD64-NOSTARTFILES-LCXX: "-bpT:0x100000000" "-bpD:0x110000000"
573 // CHECK-LD64-NOSTARTFILES-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
574 // CHECK-LD64-NOSTARTFILES-LCXX-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
575 // CHECK-LD64-NOSTARTFILES-LCXX: "-lc++"
576 // CHECK-LD64-NOSTARTFILES-LCXX: "-lc++abi"
577 // CHECK-LD64-NOSTARTFILES-LCXX: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
578 // CHECK-LD64-NOSTARTFILES-LCXX-NOT: "--as-needed"
579 // CHECK-LD64-NOSTARTFILES-LCXX: "-lunwind"
580 // CHECK-LD64-NOSTARTFILES-LCXX-NOT: "--no-as-needed"
581 // CHECK-LD64-NOSTARTFILES-LCXX: "-lm"
582 // CHECK-LD64-NOSTARTFILES-LCXX: "-lc"
584 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -stdlib=libstdc++ invokes fatal error.
585 // RUN: not --crash %clangxx %s 2>&1 -### \
586 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
587 // RUN: -stdlib=libstdc++ -nostdinc++ \
588 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
589 // RUN: | FileCheck --check-prefix=CHECK-LD-LIBSTDCXX %s
591 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -stdlib=libstdc++ invokes fatal error.
592 // RUN: not --crash %clangxx %s 2>&1 -### \
593 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
594 // RUN: -stdlib=libstdc++ -nostdinc++ \
595 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
596 // RUN: | FileCheck --check-prefix=CHECK-LD-LIBSTDCXX %s
597 // CHECK-LD-LIBSTDCXX: LLVM ERROR: linking libstdc++ unimplemented on AIX
599 // Check powerpc64-ibm-aix7.1.0.0, 32-bit. -shared.
600 // RUN: %clangxx -x c++ %s 2>&1 -### \
601 // RUN: -resource-dir=%S/Inputs/resource_dir \
602 // RUN: -shared \
603 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
604 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
605 // RUN: --unwindlib=libunwind \
606 // RUN: | FileCheck --check-prefix=CHECK-LD32-SHARED %s
607 // CHECK-LD32-SHARED: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
608 // CHECK-LD32-SHARED: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
609 // CHECK-LD32-SHARED: "-isysroot" "[[SYSROOT:[^"]+]]"
610 // CHECK-LD32-SHARED: "{{.*}}ld{{(.exe)?}}"
611 // CHECK-LD32-SHARED: "-bM:SRE"
612 // CHECK-LD32-SHARED: "-bnoentry"
613 // CHECK-LD32-SHARED: "-b32"
614 // CHECK-LD32-SHARED: "-bpT:0x10000000" "-bpD:0x20000000"
615 // CHECK-LD32-SHARED-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
616 // CHECK-LD32-SHARED-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti.o"
617 // CHECK-LD32-SHARED: "-lc++"
618 // CHECK-LD32-SHARED: "-lc++abi"
619 // CHECK-LD32-SHARED: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
620 // CHECK-LD32-SHARED-NOT: "--as-needed"
621 // CHECK-LD32-SHARED: "-lunwind"
622 // CHECK-LD32-SHARED-NOT: "--no-as-needed"
623 // CHECK-LD32-SHARED: "-lm"
624 // CHECK-LD32-SHARED: "-lc"
626 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -shared.
627 // RUN: %clangxx -x c++ %s 2>&1 -### \
628 // RUN: -resource-dir=%S/Inputs/resource_dir \
629 // RUN: -shared \
630 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
631 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
632 // RUN: --unwindlib=libunwind \
633 // RUN: | FileCheck --check-prefix=CHECK-LD64-SHARED %s
634 // CHECK-LD64-SHARED: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
635 // CHECK-LD64-SHARED: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
636 // CHECK-LD64-SHARED: "-isysroot" "[[SYSROOT:[^"]+]]"
637 // CHECK-LD64-SHARED: "{{.*}}ld{{(.exe)?}}"
638 // CHECK-LD64-SHARED: "-bM:SRE"
639 // CHECK-LD64-SHARED: "-bnoentry"
640 // CHECK-LD64-SHARED: "-b64"
641 // CHECK-LD64-SHARED: "-bpT:0x100000000" "-bpD:0x110000000"
642 // CHECK-LD64-SHARED-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0_64.o"
643 // CHECK-LD64-SHARED-NOT: "[[SYSROOT]]/usr/lib{{/|\\\\}}crti_64.o"
644 // CHECK-LD64-SHARED: "-lc++"
645 // CHECK-LD64-SHARED: "-lc++abi"
646 // CHECK-LD64-SHARED: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc64.a"
647 // CHECK-LD64-SHARED-NOT: "--as-needed"
648 // CHECK-LD64-SHARED: "-lunwind"
649 // CHECK-LD64-SHARED-NOT: "--no-as-needed"
650 // CHECK-LD64-SHARED: "-lm"
651 // CHECK-LD64-SHARED: "-lc"
653 // Check powerpc-ibm-aix7.3.0.0, -fprofile-generate
654 // RUN: %clang %s -### 2>&1 \
655 // RUN: -resource-dir=%S/Inputs/resource_dir \
656 // RUN: -static \
657 // RUN: -fprofile-generate\
658 // RUN: --target=powerpc-ibm-aix7.3.0.0 \
659 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
660 // RUN: --unwindlib=libunwind \
661 // RUN: | FileCheck --check-prefix=CHECK-PGO-NON-LTO %s
662 // CHECK-PGO-NON-LTO-NOT: warning:
663 // CHECK-PGO-NON-LTO: "-cc1" "-triple" "powerpc-ibm-aix7.3.0.0"
664 // CHECK-PGO-NON-LTO: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
665 // CHECK-PGO-NON-LTO: "-isysroot" "[[SYSROOT:[^"]+]]"
666 // CHECK-PGO-NON-LTO: "{{.*}}ld{{(.exe)?}}"
667 // CHECK-PGO-NON-LTO: "-bdbg:namedsects:ss"
668 // CHECK-PGO-NON-LTO: "-b32"
669 // CHECK-PGO-NON-LTO: "-bpT:0x10000000" "-bpD:0x20000000"
670 // CHECK-PGO-NON-LTO: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
671 // CHECK-PGO-NON-LTO-NOT: "-lc++"
672 // CHECK-PGO-NON-LTO-NOT: "-lc++abi"
673 // CHECK-PGO-NON-LTO: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
674 // CHECK-PGO-NON-LTO-NOT: "--as-needed"
675 // CHECK-PGO-NON-LTO-NOT: "-lunwind"
676 // CHECK-PGO-NON-LTO-NOT: "--no-as-needed"
677 // CHECK-PGO-NON-LTO-NOT: "-lm"
678 // CHECK-PGO-NON-LTO: "-lc"
680 // Check powerpc-ibm-aix7.2.5.3, -fprofile-generate, -flto
681 // RUN: %clang %s -### 2>&1 \
682 // RUN: -resource-dir=%S/Inputs/resource_dir \
683 // RUN: -static \
684 // RUN: -fprofile-generate\
685 // RUN: -flto\
686 // RUN: --target=powerpc-ibm-aix7.2.5.3 \
687 // RUN: --sysroot %S/Inputs/aix_ppc_tree \
688 // RUN: --unwindlib=libunwind \
689 // RUN: | FileCheck --check-prefix=CHECK-PGO-LTO %s
690 // CHECK-PGO-LTO-NOT: warning:
691 // CHECK-PGO-LTO: "-cc1" "-triple" "powerpc-ibm-aix7.2.5.3"
692 // CHECK-PGO-LTO: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
693 // CHECK-PGO-LTO: "-isysroot" "[[SYSROOT:[^"]+]]"
694 // CHECK-PGO-LTO: "{{.*}}ld{{(.exe)?}}"
695 // CHECK-PGO-LTO: "-bdbg:namedsects:ss"
696 // CHECK-PGO-LTO: "-b32"
697 // CHECK-PGO-LTO: "-bpT:0x10000000" "-bpD:0x20000000"
698 // CHECK-PGO-LTO: "[[SYSROOT]]/usr/lib{{/|\\\\}}crt0.o"
699 // CHECK-PGO-LTO-NOT: "-lc++"
700 // CHECK-PGO-LTO-NOT: "-lc++abi"
701 // CHECK-PGO-LTO: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aix{{/|\\\\}}libclang_rt.builtins-powerpc.a"
702 // CHECK-PGO-LTO-NOT: "--as-needed"
703 // CHECK-PGO-LTO-NOT: "-lunwind"
704 // CHECK-PGO-LTO-NOT: "--no-as-needed"
705 // CHECK-PGO-LTO-NOT: "-lm"
706 // CHECK-PGO-LTO: "-lc"