150
|
1 // -no_deduplicate is only present from ld64 version 262 and later.
|
|
2 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
|
|
3 // RUN: -mlinker-version=261 -O0 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
|
|
4
|
|
5 // Add -no_deduplicate when either -O0 or -O1 is explicitly specified
|
|
6 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
|
|
7 // RUN: -mlinker-version=262 -O0 2>&1 | FileCheck -check-prefix=LINK_NODEDUP %s
|
|
8 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
|
|
9 // RUN: -mlinker-version=262 -O1 2>&1 | FileCheck -check-prefix=LINK_NODEDUP %s
|
|
10
|
|
11 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
|
|
12 // RUN: -mlinker-version=262 -O2 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
|
|
13 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
|
|
14 // RUN: -mlinker-version=262 -O3 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
|
|
15 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
|
|
16 // RUN: -mlinker-version=262 -Os 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
|
|
17 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
|
|
18 // RUN: -mlinker-version=262 -O4 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
|
|
19 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
|
|
20 // RUN: -mlinker-version=262 -Ofast 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
|
|
21
|
|
22 // Add -no_deduplicate when no -O option is specified *and* this is a compile+link
|
|
23 // (implicit -O0)
|
|
24 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
|
|
25 // RUN: -mlinker-version=262 2>&1 | FileCheck -check-prefix=LINK_NODEDUP %s
|
|
26
|
|
27 // Do *not* add -no_deduplicate when no -O option is specified and this is just a link
|
|
28 // (since we can't imply -O0)
|
|
29 // RUN: rm -f %t.o %t.bin
|
221
|
30 // RUN: yaml2obj %S/Inputs/empty-x86_64-apple-darwin.yaml -o %t.o
|
150
|
31 // RUN: %clang -target x86_64-apple-darwin10 %t.o -### -mlinker-version=262 \
|
|
32 // RUN: -o %t.bin 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
|
|
33 // RUN: %clang -target x86_64-apple-darwin10 %t.o -### -mlinker-version=262 \
|
|
34 // RUN: -O0 -o %t.bin 2>&1 | FileCheck -check-prefix=LINK_NODEDUP %s
|
|
35 // RUN: %clang -target x86_64-apple-darwin10 %t.o -### -mlinker-version=262 \
|
|
36 // RUN: -O1 -o %t.bin 2>&1 | FileCheck -check-prefix=LINK_NODEDUP %s
|
|
37 // RUN: %clang -target x86_64-apple-darwin10 %t.o -### -mlinker-version=262 \
|
|
38 // RUN: -O2 -o %t.bin 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
|
|
39
|
|
40 // LINK_NODEDUP: {{ld(.exe)?"}}
|
|
41 // LINK_NODEDUP: "-no_deduplicate"
|
|
42
|
|
43 // LINK_DEDUP: {{ld(.exe)?"}}
|
|
44 // LINK_DEDUP-NOT: "-no_deduplicate"
|