1 // Check that ld gets arch_multiple.
3 // RUN: %clang -target i386-apple-darwin9 -arch i386 -arch x86_64 %s -### -o foo 2> %t.log
4 // RUN: grep '".*ld.*" .*"-arch_multiple" "-final_output" "foo"' %t.log
6 // Make sure we run dsymutil on source input files.
7 // RUN: %clang -target i386-apple-darwin9 -### -g %s -o BAR 2> %t.log
8 // RUN: grep '".*dsymutil" "-o" "BAR.dSYM" "BAR"' %t.log
9 // RUN: %clang -target i386-apple-darwin9 -### -g -filelist FOO %s -o BAR 2> %t.log
10 // RUN: grep '".*dsymutil" "-o" "BAR.dSYM" "BAR"' %t.log
12 // Check linker changes that came with new linkedit format.
14 // RUN: %clang -target i386-apple-darwin9 -### -arch armv6 -miphoneos-version-min=3.0 %t.o 2> %t.log
15 // RUN: %clang -target i386-apple-darwin9 -### -arch armv6 -miphoneos-version-min=3.0 -dynamiclib %t.o 2>> %t.log
16 // RUN: %clang -target i386-apple-darwin9 -### -arch armv6 -miphoneos-version-min=3.0 -bundle %t.o 2>> %t.log
17 // RUN: FileCheck -check-prefix=LINK_IPHONE_3_0 %s < %t.log
19 // LINK_IPHONE_3_0: {{ld(.exe)?"}}
20 // LINK_IPHONE_3_0: -iphoneos_version_min
21 // LINK_IPHONE_3_0: 3.0.0
22 // LINK_IPHONE_3_0-NOT: -lcrt1.3.1.o
23 // LINK_IPHONE_3_0: -lcrt1.o
24 // LINK_IPHONE_3_0: -lSystem
25 // LINK_IPHONE_3_0: {{ld(.exe)?"}}
26 // LINK_IPHONE_3_0: -dylib
27 // LINK_IPHONE_3_0: -ldylib1.o
28 // LINK_IPHONE_3_0: -lSystem
29 // LINK_IPHONE_3_0: {{ld(.exe)?"}}
30 // LINK_IPHONE_3_0: -lbundle1.o
31 // LINK_IPHONE_3_0: -lSystem
33 // RUN: %clang -target i386-apple-darwin9 -### -arch armv7 -miphoneos-version-min=3.1 %t.o 2> %t.log
34 // RUN: %clang -target i386-apple-darwin9 -### -arch armv7 -miphoneos-version-min=3.1 -dynamiclib %t.o 2>> %t.log
35 // RUN: %clang -target i386-apple-darwin9 -### -arch armv7 -miphoneos-version-min=3.1 -bundle %t.o 2>> %t.log
36 // RUN: FileCheck -check-prefix=LINK_IPHONE_3_1 %s < %t.log
38 // LINK_IPHONE_3_1: {{ld(.exe)?"}}
39 // LINK_IPHONE_3_1: -iphoneos_version_min
40 // LINK_IPHONE_3_1: 3.1.0
41 // LINK_IPHONE_3_1-NOT: -lcrt1.o
42 // LINK_IPHONE_3_1: -lcrt1.3.1.o
43 // LINK_IPHONE_3_1: -lSystem
44 // LINK_IPHONE_3_1: {{ld(.exe)?"}}
45 // LINK_IPHONE_3_1: -dylib
46 // LINK_IPHONE_3_1-NOT: -ldylib1.o
47 // LINK_IPHONE_3_1: -lSystem
48 // LINK_IPHONE_3_1: {{ld(.exe)?"}}
49 // LINK_IPHONE_3_1-NOT: -lbundle1.o
50 // LINK_IPHONE_3_1: -lSystem
52 // RUN: %clang -target i386-apple-darwin9 -### -arch i386 -mios-simulator-version-min=3.0 %t.o 2> %t.log
53 // RUN: %clang -target i386-apple-darwin9 -### -arch i386 -mios-simulator-version-min=3.0 -dynamiclib %t.o 2>> %t.log
54 // RUN: %clang -target i386-apple-darwin9 -### -arch i386 -mios-simulator-version-min=3.0 -bundle %t.o 2>> %t.log
55 // RUN: FileCheck -check-prefix=LINK_IOSSIM_3_0 %s < %t.log
57 // LINK_IOSSIM_3_0: {{ld(.exe)?"}}
58 // LINK_IOSSIM_3_0: -ios_simulator_version_min
59 // LINK_IOSSIM_3_0: 3.0.0
60 // LINK_IOSSIM_3_0-NOT: -lcrt1.o
61 // LINK_IOSSIM_3_0: -lSystem
62 // LINK_IOSSIM_3_0: {{ld(.exe)?"}}
63 // LINK_IOSSIM_3_0: -dylib
64 // LINK_IOSSIM_3_0-NOT: -ldylib1.o
65 // LINK_IOSSIM_3_0: -lSystem
66 // LINK_IOSSIM_3_0: {{ld(.exe)?"}}
67 // LINK_IOSSIM_3_0-NOT: -lbundle1.o
68 // LINK_IOSSIM_3_0: -lSystem
70 // RUN: %clang -target i386-apple-darwin9 -### -fpie %t.o 2> %t.log
71 // RUN: FileCheck -check-prefix=LINK_EXPLICIT_PIE %s < %t.log
73 // LINK_EXPLICIT_PIE: {{ld(.exe)?"}}
74 // LINK_EXPLICIT_PIE: "-pie"
76 // RUN: %clang -target i386-apple-darwin9 -### -fno-pie %t.o 2> %t.log
77 // RUN: FileCheck -check-prefix=LINK_EXPLICIT_NO_PIE %s < %t.log
79 // LINK_EXPLICIT_NO_PIE: {{ld(.exe)?"}}
80 // LINK_EXPLICIT_NO_PIE: "-no_pie"
82 // RUN: %clang -target x86_64-apple-darwin10 -### %t.o \
83 // RUN: -mlinker-version=100 2> %t.log
84 // RUN: FileCheck -check-prefix=LINK_NEWER_DEMANGLE %s < %t.log
86 // LINK_NEWER_DEMANGLE: {{ld(.exe)?"}}
87 // LINK_NEWER_DEMANGLE: "-demangle"
89 // RUN: %clang -target x86_64-apple-darwin10 -### %t.o \
90 // RUN: -mlinker-version=100 -Wl,--no-demangle 2> %t.log
91 // RUN: FileCheck -check-prefix=LINK_NEWER_NODEMANGLE %s < %t.log
93 // LINK_NEWER_NODEMANGLE: {{ld(.exe)?"}}
94 // LINK_NEWER_NODEMANGLE-NOT: "-demangle"
95 // LINK_NEWER_NODEMANGLE: "-lSystem"
97 // RUN: %clang -target x86_64-apple-darwin10 -### %t.o \
98 // RUN: -mlinker-version=95 2> %t.log
99 // RUN: FileCheck -check-prefix=LINK_OLDER_NODEMANGLE %s < %t.log
101 // LINK_OLDER_NODEMANGLE: {{ld(.exe)?"}}
102 // LINK_OLDER_NODEMANGLE-NOT: "-demangle"
103 // LINK_OLDER_NODEMANGLE: "-lSystem"
105 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
106 // RUN: -mlinker-version=117 -flto 2> %t.log
108 // RUN: FileCheck -check-prefix=LINK_OBJECT_LTO_PATH %s < %t.log
110 // LINK_OBJECT_LTO_PATH: {{ld(.exe)?"}}
111 // LINK_OBJECT_LTO_PATH: "-object_path_lto"
113 // RUN: %clang -target x86_64-apple-darwin10 -### %t.o \
114 // RUN: -force_load a -force_load b 2> %t.log
116 // RUN: FileCheck -check-prefix=FORCE_LOAD %s < %t.log
118 // FORCE_LOAD: {{ld(.exe)?"}}
119 // FORCE_LOAD: "-force_load" "a" "-force_load" "b"
121 // RUN: %clang -target x86_64-apple-darwin10 -### %t.o \
122 // RUN: -lazy_framework Framework 2> %t.log
124 // RUN: FileCheck -check-prefix=LINK_LAZY_FRAMEWORK %s < %t.log
125 // LINK_LAZY_FRAMEWORK: {{ld(.exe)?"}}
126 // LINK_LAZY_FRAMEWORK: "-lazy_framework" "Framework"
128 // RUN: %clang -target x86_64-apple-darwin10 -### %t.o \
129 // RUN: -lazy_library Library 2> %t.log
131 // RUN: FileCheck -check-prefix=LINK_LAZY_LIBRARY %s < %t.log
132 // LINK_LAZY_LIBRARY: {{ld(.exe)?"}}
133 // LINK_LAZY_LIBRARY: "-lazy_library" "Library"
135 // RUN: %clang -target x86_64-apple-darwin10 -### %t.o 2> %t.log
136 // RUN: %clang -target x86_64-apple-macosx10.7 -### %t.o 2>> %t.log
137 // RUN: FileCheck -check-prefix=LINK_VERSION_MIN %s < %t.log
138 // LINK_VERSION_MIN: {{ld(.exe)?"}}
139 // LINK_VERSION_MIN: "-macosx_version_min" "10.6.0"
140 // LINK_VERSION_MIN: {{ld(.exe)?"}}
141 // LINK_VERSION_MIN: "-macosx_version_min" "10.7.0"
143 // RUN: %clang -target x86_64-apple-darwin12 -### %t.o 2> %t.log
144 // RUN: FileCheck -check-prefix=LINK_NO_CRT1 %s < %t.log
145 // LINK_NO_CRT1-NOT: crt
147 // RUN: %clang -target armv7-apple-ios6.0 -miphoneos-version-min=6.0 -### %t.o 2> %t.log
148 // RUN: FileCheck -check-prefix=LINK_NO_IOS_CRT1 %s < %t.log
149 // LINK_NO_IOS_CRT1-NOT: crt
151 // RUN: %clang -target arm64-apple-ios5.0 -miphoneos-version-min=5.0 -### %t.o 2> %t.log
152 // RUN: FileCheck -check-prefix=LINK_NO_IOS_ARM64_CRT1 %s < %t.log
153 // LINK_NO_IOS_ARM64_CRT1-NOT: crt
155 // RUN: %clang -target x86_64-apple-ios6.0 -miphoneos-version-min=6.0 -fprofile-instr-generate -### %t.o 2> %t.log
156 // RUN: FileCheck -check-prefix=LINK_IOSSIM_PROFILE %s < %t.log
157 // LINK_IOSSIM_PROFILE: {{ld(.exe)?"}}
158 // LINK_IOSSIM_PROFILE: libclang_rt.profile_iossim.a
160 // FIXME: Currently the builtin library is only added to the command line if it,
161 // so we can't check for it here
162 // FIXME_LINK_IOSSIM_PROFILE: libclang_rt.ios.a
164 // RUN: %clang -target arm64-apple-tvos8.3 -mtvos-version-min=8.3 -### %t.o 2> %t.log
165 // RUN: FileCheck -check-prefix=LINK_TVOS_ARM64 %s < %t.log
166 // LINK_TVOS_ARM64: {{ld(.exe)?"}}
167 // LINK_TVOS_ARM64: -tvos_version_min
168 // LINK_TVOS_ARM64-NOT: crt
169 // LINK_TVOS_ARM64-NOT: lgcc_s.1
170 // FIXME: This library does not get built unless the tvOS SDK is
171 // installed, and the driver will not try to link it if it does not exist.
172 // This should be reenabled when the tvOS SDK becomes a standard part
174 // FIXME_LINK_TVOS_ARM64: libclang_rt.tvos.a
176 // RUN: %clang -target arm64-apple-tvos8.3 -mtvos-version-min=8.3 -fprofile-instr-generate -### %t.o 2> %t.log
177 // RUN: FileCheck -check-prefix=LINK_TVOS_PROFILE %s < %t.log
178 // LINK_TVOS_PROFILE: {{ld(.exe)?"}}
179 // FIXME: These libraries do not get built unless the tvOS SDK is
180 // installed, and the driver will not try to link them if they do not exist.
181 // This should be reenabled when the tvOS SDK becomes a standard part
183 // FIXME_LINK_TVOS_PROFILE: libclang_rt.profile_tvos.a
184 // FIXME_LINK_TVOS_PROFILE: libclang_rt.tvos.a
186 // RUN: %clang -target arm64-apple-tvos8.3 -mtvos-version-min=8.3 -### %t.o -lcc_kext 2> %t.log
187 // RUN: FileCheck -check-prefix=LINK_TVOS_KEXT %s < %t.log
188 // LINK_TVOS_KEXT: {{ld(.exe)?"}}
189 // FIXME: These libraries do not get built unless the tvOS SDK is
190 // installed, and the driver will not try to link them if they do not exist.
191 // This should be reenabled when the tvOS SDK becomes a standard part
193 // FIXME_LINK_TVOS_KEXT: libclang_rt.cc_kext_tvos.a
194 // FIXME_LINK_TVOS_KEXT: libclang_rt.tvos.a
196 // RUN: %clang -target armv7k-apple-watchos2.0 -mwatchos-version-min=2.0 -### %t.o 2> %t.log
197 // RUN: FileCheck -check-prefix=LINK_WATCHOS_ARM %s < %t.log
198 // LINK_WATCHOS_ARM: {{ld(.exe)?"}}
199 // LINK_WATCHOS_ARM: -watchos_version_min
200 // LINK_WATCHOS_ARM-NOT: crt
201 // LINK_WATCHOS_ARM-NOT: lgcc_s.1
202 // FIXME: This library does not get built unless the watchOS SDK is
203 // installed, and the driver will not try to link it if it does not exist.
204 // This should be reenabled when the watchOS SDK becomes a standard part
206 // FIXME_LINK_WATCHOS_ARM: libclang_rt.watchos.a
208 // RUN: %clang -target armv7k-apple-watchos2.0 -mwatchos-version-min=2.0 -fprofile-instr-generate -### %t.o 2> %t.log
209 // RUN: FileCheck -check-prefix=LINK_WATCHOS_PROFILE %s < %t.log
210 // LINK_WATCHOS_PROFILE: {{ld(.exe)?"}}
211 // FIXME: These libraries do not get built unless the watchOS SDK is
212 // installed, and the driver will not try to link them if they do not exist.
213 // This should be reenabled when the watchOS SDK becomes a standard part
215 // FIXME_LINK_WATCHOS_PROFILE: libclang_rt.profile_watchos.a
216 // FIXME_LINK_WATCHOS_PROFILE: libclang_rt.watchos.a
218 // RUN: %clang -target armv7k-apple-watchos2.0 -mwatchos-version-min=2.0 -### %t.o -lcc_kext 2> %t.log
219 // RUN: FileCheck -check-prefix=LINK_WATCHOS_KEXT %s < %t.log
220 // LINK_WATCHOS_KEXT: {{ld(.exe)?"}}
221 // FIXME: These libraries do not get built unless the watchOS SDK is
222 // installed, and the driver will not try to link them if they do not exist.
223 // This should be reenabled when the watchOS SDK becomes a standard part
225 // FIXME_LINK_WATCHOS_KEXT: libclang_rt.cc_kext_watchos.a
226 // FIXME_LINK_WATCHOS_KEXT: libclang_rt.watchos.a
228 // RUN: %clang -target i386-apple-darwin12 -pg -### %t.o 2> %t.log
229 // RUN: FileCheck -check-prefix=LINK_PG %s < %t.log
230 // LINK_PG: -lgcrt1.o
231 // LINK_PG: -no_new_main
233 // Check that clang links with libgcc_s.1 for iOS 4 and earlier, but not arm64.
234 // RUN: %clang -target armv7-apple-ios4.0 -miphoneos-version-min=4.0 -### %t.o 2> %t.log
235 // RUN: FileCheck -check-prefix=LINK_IOS_LIBGCC_S %s < %t.log
236 // LINK_IOS_LIBGCC_S: lgcc_s.1
238 // RUN: %clang -target arm64-apple-ios4.0 -miphoneos-version-min=4.0 -### %t.o 2> %t.log
239 // RUN: FileCheck -check-prefix=LINK_NO_IOS_ARM64_LIBGCC_S %s < %t.log
240 // LINK_NO_IOS_ARM64_LIBGCC_S-NOT: lgcc_s.1
242 // RUN: %clang -target x86_64-apple-darwin12 -rdynamic -### %t.o \
243 // RUN: -mlinker-version=100 2> %t.log
244 // RUN: FileCheck -check-prefix=LINK_NO_EXPORT_DYNAMIC %s < %t.log
245 // LINK_NO_EXPORT_DYNAMIC: {{ld(.exe)?"}}
246 // LINK_NO_EXPORT_DYNAMIC-NOT: "-export_dynamic"
248 // RUN: %clang -target x86_64-apple-darwin12 -rdynamic -### %t.o \
249 // RUN: -mlinker-version=137 2> %t.log
250 // RUN: FileCheck -check-prefix=LINK_EXPORT_DYNAMIC %s < %t.log
251 // LINK_EXPORT_DYNAMIC: {{ld(.exe)?"}}
252 // LINK_EXPORT_DYNAMIC: "-export_dynamic"
254 // RUN: %clang -target x86_64h-apple-darwin -### %t.o 2> %t.log
255 // RUN: FileCheck -check-prefix=LINK_X86_64H_ARCH %s < %t.log
257 // LINK_X86_64H_ARCH: {{ld(.exe)?"}}
258 // LINK_X86_64H_ARCH: "x86_64h"
260 // RUN: %clang -target x86_64-apple-darwin -arch x86_64 -arch x86_64h -### %t.o 2> %t.log
261 // RUN: FileCheck -check-prefix=LINK_X86_64H_MULTIARCH %s < %t.log
263 // LINK_X86_64H_MULTIARCH: {{ld(.exe)?"}}
264 // LINK_X86_64H_MULTIARCH: "x86_64"
266 // LINK_X86_64H_MULTIARCH: {{ld(.exe)?"}}
267 // LINK_X86_64H_MULTIARCH: "x86_64h"
269 // Check for the linker options to specify the iOS version when the
270 // IPHONEOS_DEPLOYMENT_TARGET variable is used instead of the command-line
271 // deployment target options.
272 // RUN: env IPHONEOS_DEPLOYMENT_TARGET=7.0 \
273 // RUN: %clang -target arm64-apple-darwin -### %t.o 2> %t.log
274 // RUN: FileCheck -check-prefix=LINK_IPHONEOS_VERSION_MIN %s < %t.log
275 // RUN: env IPHONEOS_DEPLOYMENT_TARGET=7.0 \
276 // RUN: %clang -target i386-apple-darwin -### %t.o 2> %t.log
277 // RUN: FileCheck -check-prefix=LINK_IOS_SIMULATOR_VERSION_MIN %s < %t.log
278 // LINK_IPHONEOS_VERSION_MIN: -iphoneos_version_min
279 // LINK_IOS_SIMULATOR_VERSION_MIN: -ios_simulator_version_min
281 // Ditto for tvOS....
282 // RUN: env TVOS_DEPLOYMENT_TARGET=7.0 \
283 // RUN: %clang -target armv7-apple-darwin -### %t.o 2> %t.log
284 // RUN: FileCheck -check-prefix=LINK_TVOS_VERSION_MIN %s < %t.log
285 // RUN: env TVOS_DEPLOYMENT_TARGET=7.0 \
286 // RUN: %clang -target x86_64-apple-darwin -### %t.o 2> %t.log
287 // RUN: FileCheck -check-prefix=LINK_TVOS_SIMULATOR_VERSION_MIN %s < %t.log
288 // LINK_TVOS_VERSION_MIN: -tvos_version_min
289 // LINK_TVOS_SIMULATOR_VERSION_MIN: -tvos_simulator_version_min
291 // ...and for watchOS.
292 // RUN: env WATCHOS_DEPLOYMENT_TARGET=2.0 \
293 // RUN: %clang -target armv7k-apple-darwin -### %t.o 2> %t.log
294 // RUN: FileCheck -check-prefix=LINK_WATCHOS_VERSION_MIN %s < %t.log
295 // RUN: env WATCHOS_DEPLOYMENT_TARGET=2.0 \
296 // RUN: %clang -target i386-apple-darwin -### %t.o 2> %t.log
297 // RUN: FileCheck -check-prefix=LINK_WATCHOS_SIMULATOR_VERSION_MIN %s < %t.log
298 // LINK_WATCHOS_VERSION_MIN: -watchos_version_min
299 // LINK_WATCHOS_SIMULATOR_VERSION_MIN: -watchos_simulator_version_min
301 // Check -iframework gets forward to ld as -F
302 // RUN: %clang -target x86_64-apple-darwin %s -iframework Bar -framework Foo -### 2>&1 | \
303 // RUN: FileCheck --check-prefix=LINK-IFRAMEWORK %s
304 // LINK-IFRAMEWORK: {{ld(.exe)?"}}
305 // LINK-IFRAMEWORK: "-FBar"
307 // Check ld64 accepts up to 5 digits with no extra characters
308 // RUN: %clang -target x86_64-apple-darwin12 %s -### -o %t \
309 // RUN: -mlinker-version=133.3 2> %t.log
310 // RUN: %clang -target x86_64-apple-darwin12 %s -### -o %t \
311 // RUN: -mlinker-version=133.3.0 2>> %t.log
312 // RUN: %clang -target x86_64-apple-darwin12 %s -### -o %t \
313 // RUN: -mlinker-version=133.3.0.1 2>> %t.log
314 // RUN: %clang -target x86_64-apple-darwin12 %s -### -o %t \
315 // RUN: -mlinker-version=133.3.0.1.2 2>> %t.log
316 // RUN: %clang -target x86_64-apple-darwin12 %s -### -o %t \
317 // RUN: -mlinker-version=133.3.0.1.2.6 2>> %t.log
318 // RUN: %clang -target x86_64-apple-darwin12 %s -### -o %t \
319 // RUN: -mlinker-version=133.3.0.1.a 2>> %t.log
320 // RUN: %clang -target x86_64-apple-darwin12 %s -### -o %t \
321 // RUN: -mlinker-version=133.3.0.1a 2>> %t.log
322 // RUN: FileCheck -check-prefix=LINK_VERSION_DIGITS %s < %t.log
323 // LINK_VERSION_DIGITS-NOT: invalid version number in '-mlinker-version=133.3'
324 // LINK_VERSION_DIGITS-NOT: invalid version number in '-mlinker-version=133.3.0'
325 // LINK_VERSION_DIGITS-NOT: invalid version number in '-mlinker-version=133.3.0.1'
326 // LINK_VERSION_DIGITS-NOT: invalid version number in '-mlinker-version=133.3.0.1.2'
327 // LINK_VERSION_DIGITS: invalid version number in '-mlinker-version=133.3.0.1.2.6'
328 // LINK_VERSION_DIGITS: invalid version number in '-mlinker-version=133.3.0.1.a'
329 // LINK_VERSION_DIGITS: invalid version number in '-mlinker-version=133.3.0.1a'
331 // Check that we're passing -lto-pass-remarks-output for LTO
332 // RUN: %clang -target x86_64-apple-darwin12 %t.o -fsave-optimization-record -### -o foo/bar.out 2> %t.log
333 // RUN: FileCheck -check-prefix=PASS_REMARKS_OUTPUT %s < %t.log
334 // PASS_REMARKS_OUTPUT: "-mllvm" "-lto-pass-remarks-output" "-mllvm" "foo/bar.out.opt.yaml"
335 // PASS_REMARKS_OUTPUT-NOT: -lto-pass-remarks-with-hotness
337 // RUN: %clang -target x86_64-apple-darwin12 %t.o -fsave-optimization-record -### 2> %t.log
338 // RUN: FileCheck -check-prefix=PASS_REMARKS_OUTPUT_NO_O %s < %t.log
339 // PASS_REMARKS_OUTPUT_NO_O: "-mllvm" "-lto-pass-remarks-output" "-mllvm" "a.out.opt.yaml"
341 // RUN: %clang -target x86_64-apple-darwin12 %t.o -fsave-optimization-record -fprofile-instr-use=blah -### -o foo/bar.out 2> %t.log
342 // RUN: FileCheck -check-prefix=PASS_REMARKS_WITH_HOTNESS %s < %t.log
343 // PASS_REMARKS_WITH_HOTNESS: "-mllvm" "-lto-pass-remarks-output" "-mllvm" "foo/bar.out.opt.yaml" "-mllvm" "-lto-pass-remarks-with-hotness"
345 // RUN: %clang -target x86_64-apple-darwin12 %t.o -fsave-optimization-record -fprofile-instr-use=blah -fdiagnostics-hotness-threshold=100 -### -o foo/bar.out 2> %t.log
346 // RUN: FileCheck -check-prefix=PASS_REMARKS_WITH_HOTNESS_THRESHOLD %s < %t.log
347 // PASS_REMARKS_WITH_HOTNESS_THRESHOLD: "-mllvm" "-lto-pass-remarks-output" "-mllvm" "foo/bar.out.opt.yaml" "-mllvm" "-lto-pass-remarks-with-hotness" "-mllvm" "-lto-pass-remarks-hotness-threshold=100"
349 // RUN: %clang -target x86_64-apple-ios6.0 -miphoneos-version-min=6.0 -fprofile-instr-generate -### %t.o 2> %t.log
350 // RUN: FileCheck -check-prefix=LINK_PROFILE_FIRST %s < %t.log
351 // RUN: %clang -target x86_64-apple-darwin12 -fprofile-instr-generate -### %t.o 2> %t.log
352 // RUN: FileCheck -check-prefix=LINK_PROFILE_FIRST %s < %t.log
353 // RUN: %clang -target i386-apple-darwin9 -fprofile-instr-generate -### %t.o 2> %t.log
354 // RUN: FileCheck -check-prefix=LINK_PROFILE_FIRST %s < %t.log
355 // RUN: %clang -target arm64-apple-ios5.0 -miphoneos-version-min=5.0 -fprofile-instr-generate -### %t.o 2> %t.log
356 // RUN: FileCheck -check-prefix=LINK_PROFILE_FIRST %s < %t.log
357 // LINK_PROFILE_FIRST: {{ld(.exe)?"}} "{{[^"]+}}libclang_rt.profile_{{[a-z]+}}.a"
359 // RUN: %clang -target x86_64-apple-darwin12 -fprofile-instr-generate -exported_symbols_list /dev/null -### %t.o 2> %t.log
360 // RUN: FileCheck -check-prefix=PROFILE_EXPORT %s < %t.log
361 // RUN: %clang -target x86_64-apple-darwin12 -fprofile-instr-generate -Wl,-exported_symbols_list,/dev/null -### %t.o 2> %t.log
362 // RUN: FileCheck -check-prefix=PROFILE_EXPORT %s < %t.log
363 // RUN: %clang -target x86_64-apple-darwin12 -fprofile-instr-generate -Wl,-exported_symbol,foo -### %t.o 2> %t.log
364 // RUN: FileCheck -check-prefix=PROFILE_EXPORT %s < %t.log
365 // RUN: %clang -target x86_64-apple-darwin12 -fprofile-instr-generate -Xlinker -exported_symbol -Xlinker foo -### %t.o 2> %t.log
366 // RUN: FileCheck -check-prefix=PROFILE_EXPORT %s < %t.log
367 // RUN: %clang -target x86_64-apple-darwin12 -fprofile-instr-generate -Xlinker -exported_symbols_list -Xlinker /dev/null -### %t.o 2> %t.log
368 // RUN: FileCheck -check-prefix=PROFILE_EXPORT %s < %t.log
369 // PROFILE_EXPORT: "-exported_symbol" "___llvm_profile_filename" "-exported_symbol" "___llvm_profile_raw_version" "-exported_symbol" "_lprofCurFilename"
371 // RUN: %clang -target x86_64-apple-darwin12 -fprofile-instr-generate -### %t.o 2> %t.log
372 // RUN: FileCheck -check-prefix=NO_PROFILE_EXPORT %s < %t.log
373 // NO_PROFILE_EXPORT-NOT: "-exported_symbol"
375 // Check that we can pass the outliner down to the linker.
376 // RUN: env IPHONEOS_DEPLOYMENT_TARGET=7.0 \
377 // RUN: %clang -target arm64-apple-darwin -moutline -### %t.o 2> %t.log
379 // MOUTLINE-SAME: "-mllvm" "-enable-machine-outliner" "-mllvm" "-enable-linkonceodr-outlining"