150
|
1 // Test handling of -f(no-)function-sections and -f(no-)data-sections
|
|
2 //
|
|
3 // CHECK-FS: -ffunction-sections
|
|
4 // CHECK-NOFS-NOT: -ffunction-sections
|
|
5 // CHECK-DS: -fdata-sections
|
|
6 // CHECK-NODS-NOT: -fdata-sections
|
|
7 // CHECK-US-NOT: -fno-unique-section-names
|
|
8 // CHECK-NOUS: -fno-unique-section-names
|
236
|
9 // CHECK-PLUGIN-DEFAULT-NOT: "-plugin-opt=-function-sections
|
|
10 // CHECK-PLUGIN-DEFAULT-NOT: "-plugin-opt=-data-sections
|
|
11 // CHECK-PLUGIN-SECTIONS: "-plugin-opt=-function-sections=1"
|
|
12 // CHECK-PLUGIN-SECTIONS: "-plugin-opt=-data-sections=1"
|
|
13 // CHECK-PLUGIN-NO-SECTIONS: "-plugin-opt=-function-sections=0"
|
|
14 // CHECK-PLUGIN-NO-SECTIONS: "-plugin-opt=-data-sections=0"
|
150
|
15
|
236
|
16 // RUN: %clang -### %s -fsyntax-only 2>&1 \
|
|
17 // RUN: --target=i386-unknown-linux \
|
150
|
18 // RUN: | FileCheck --check-prefix=CHECK-NOFS --check-prefix=CHECK-NODS %s
|
|
19
|
236
|
20 // RUN: %clang -### %s -fsyntax-only 2>&1 \
|
|
21 // RUN: --target=i386-unknown-linux \
|
150
|
22 // RUN: -ffunction-sections \
|
|
23 // RUN: | FileCheck --check-prefix=CHECK-FS %s
|
|
24
|
236
|
25 // RUN: %clang -### %s -fsyntax-only 2>&1 \
|
|
26 // RUN: --target=i386-unknown-linux \
|
150
|
27 // RUN: -fno-function-sections \
|
|
28 // RUN: | FileCheck --check-prefix=CHECK-NOFS %s
|
|
29
|
236
|
30 // RUN: %clang -### %s -fsyntax-only 2>&1 \
|
|
31 // RUN: --target=i386-unknown-linux \
|
150
|
32 // RUN: -ffunction-sections -fno-function-sections \
|
|
33 // RUN: | FileCheck --check-prefix=CHECK-NOFS %s
|
|
34
|
236
|
35 // RUN: %clang -### %s -fsyntax-only 2>&1 \
|
|
36 // RUN: --target=i386-unknown-linux \
|
150
|
37 // RUN: -fno-function-sections -ffunction-sections \
|
|
38 // RUN: | FileCheck --check-prefix=CHECK-FS %s
|
|
39
|
236
|
40 // RUN: %clang -### %s -fsyntax-only 2>&1 \
|
|
41 // RUN: --target=i386-unknown-linux \
|
150
|
42 // RUN: -ffunction-sections -fno-function-sections -ffunction-sections \
|
|
43 // RUN: | FileCheck --check-prefix=CHECK-FS %s
|
|
44
|
|
45
|
236
|
46 // RUN: %clang -### %s -fsyntax-only 2>&1 \
|
|
47 // RUN: --target=i386-unknown-linux \
|
150
|
48 // RUN: -fdata-sections \
|
|
49 // RUN: | FileCheck --check-prefix=CHECK-DS %s
|
|
50
|
236
|
51 // RUN: %clang -### %s -fsyntax-only 2>&1 \
|
|
52 // RUN: --target=i386-unknown-linux \
|
150
|
53 // RUN: -fno-data-sections \
|
|
54 // RUN: | FileCheck --check-prefix=CHECK-NODS %s
|
|
55
|
236
|
56 // RUN: %clang -### %s -fsyntax-only 2>&1 \
|
|
57 // RUN: --target=i386-unknown-linux \
|
150
|
58 // RUN: -fdata-sections -fno-data-sections \
|
|
59 // RUN: | FileCheck --check-prefix=CHECK-NODS %s
|
|
60
|
236
|
61 // RUN: %clang -### %s -fsyntax-only 2>&1 \
|
|
62 // RUN: --target=i386-unknown-linux \
|
150
|
63 // RUN: -fno-data-sections -fdata-sections \
|
|
64 // RUN: | FileCheck --check-prefix=CHECK-DS %s
|
|
65
|
236
|
66 // RUN: %clang -### %s -fsyntax-only 2>&1 \
|
|
67 // RUN: --target=i386-unknown-linux \
|
150
|
68 // RUN: -fdata-sections -fno-data-sections -fdata-sections \
|
|
69 // RUN: | FileCheck --check-prefix=CHECK-DS %s
|
|
70
|
|
71
|
236
|
72 // RUN: %clang -### %s -fsyntax-only 2>&1 \
|
|
73 // RUN: --target=i386-unknown-linux \
|
150
|
74 // RUN: -funique-section-names \
|
|
75 // RUN: | FileCheck --check-prefix=CHECK-US %s
|
|
76
|
236
|
77 // RUN: %clang -### %s -fsyntax-only 2>&1 \
|
|
78 // RUN: --target=i386-unknown-linux \
|
150
|
79 // RUN: -fno-unique-section-names \
|
|
80 // RUN: | FileCheck --check-prefix=CHECK-NOUS %s
|
236
|
81
|
|
82
|
|
83 // RUN: %clang -### %s -flto 2>&1 \
|
|
84 // RUN: --target=x86_64-unknown-linux \
|
|
85 // RUN: | FileCheck --check-prefix=CHECK-PLUGIN-DEFAULT %s
|
|
86
|
|
87 // RUN: %clang -### %s -flto 2>&1 \
|
|
88 // RUN: --target=x86_64-unknown-linux \
|
|
89 // RUN: -ffunction-sections -fdata-sections \
|
|
90 // RUN: | FileCheck --check-prefix=CHECK-PLUGIN-SECTIONS %s
|
|
91
|
|
92 // RUN: %clang -### %s -flto 2>&1 \
|
|
93 // RUN: --target=x86_64-unknown-linux \
|
|
94 // RUN: -fno-function-sections -fno-data-sections \
|
|
95 // RUN: | FileCheck --check-prefix=CHECK-PLUGIN-NO-SECTIONS %s
|