annotate clang/test/Driver/darwin-ld-dedup.c @ 252:1f2b6ac9f198 llvm-original

LLVM16-1
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 18 Aug 2023 09:04:13 +0900
parents 79ff65ed7e25
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // -no_deduplicate is only present from ld64 version 262 and later.
anatofuz
parents:
diff changeset
2 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
anatofuz
parents:
diff changeset
3 // RUN: -mlinker-version=261 -O0 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 // Add -no_deduplicate when either -O0 or -O1 is explicitly specified
anatofuz
parents:
diff changeset
6 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
anatofuz
parents:
diff changeset
7 // RUN: -mlinker-version=262 -O0 2>&1 | FileCheck -check-prefix=LINK_NODEDUP %s
anatofuz
parents:
diff changeset
8 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
anatofuz
parents:
diff changeset
9 // RUN: -mlinker-version=262 -O1 2>&1 | FileCheck -check-prefix=LINK_NODEDUP %s
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
anatofuz
parents:
diff changeset
12 // RUN: -mlinker-version=262 -O2 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
anatofuz
parents:
diff changeset
13 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
anatofuz
parents:
diff changeset
14 // RUN: -mlinker-version=262 -O3 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
anatofuz
parents:
diff changeset
15 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
anatofuz
parents:
diff changeset
16 // RUN: -mlinker-version=262 -Os 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
anatofuz
parents:
diff changeset
17 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
anatofuz
parents:
diff changeset
18 // RUN: -mlinker-version=262 -O4 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
anatofuz
parents:
diff changeset
19 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
anatofuz
parents:
diff changeset
20 // RUN: -mlinker-version=262 -Ofast 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 // Add -no_deduplicate when no -O option is specified *and* this is a compile+link
anatofuz
parents:
diff changeset
23 // (implicit -O0)
anatofuz
parents:
diff changeset
24 // RUN: %clang -target x86_64-apple-darwin10 -### %s \
anatofuz
parents:
diff changeset
25 // RUN: -mlinker-version=262 2>&1 | FileCheck -check-prefix=LINK_NODEDUP %s
anatofuz
parents:
diff changeset
26
anatofuz
parents:
diff changeset
27 // Do *not* add -no_deduplicate when no -O option is specified and this is just a link
anatofuz
parents:
diff changeset
28 // (since we can't imply -O0)
anatofuz
parents:
diff changeset
29 // RUN: rm -f %t.o %t.bin
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
30 // RUN: yaml2obj %S/Inputs/empty-x86_64-apple-darwin.yaml -o %t.o
150
anatofuz
parents:
diff changeset
31 // RUN: %clang -target x86_64-apple-darwin10 %t.o -### -mlinker-version=262 \
anatofuz
parents:
diff changeset
32 // RUN: -o %t.bin 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
anatofuz
parents:
diff changeset
33 // RUN: %clang -target x86_64-apple-darwin10 %t.o -### -mlinker-version=262 \
anatofuz
parents:
diff changeset
34 // RUN: -O0 -o %t.bin 2>&1 | FileCheck -check-prefix=LINK_NODEDUP %s
anatofuz
parents:
diff changeset
35 // RUN: %clang -target x86_64-apple-darwin10 %t.o -### -mlinker-version=262 \
anatofuz
parents:
diff changeset
36 // RUN: -O1 -o %t.bin 2>&1 | FileCheck -check-prefix=LINK_NODEDUP %s
anatofuz
parents:
diff changeset
37 // RUN: %clang -target x86_64-apple-darwin10 %t.o -### -mlinker-version=262 \
anatofuz
parents:
diff changeset
38 // RUN: -O2 -o %t.bin 2>&1 | FileCheck -check-prefix=LINK_DEDUP %s
anatofuz
parents:
diff changeset
39
anatofuz
parents:
diff changeset
40 // LINK_NODEDUP: {{ld(.exe)?"}}
anatofuz
parents:
diff changeset
41 // LINK_NODEDUP: "-no_deduplicate"
anatofuz
parents:
diff changeset
42
anatofuz
parents:
diff changeset
43 // LINK_DEDUP: {{ld(.exe)?"}}
anatofuz
parents:
diff changeset
44 // LINK_DEDUP-NOT: "-no_deduplicate"