annotate lld/ELF/Options.td @ 173:0572611fdcc8 llvm10 llvm12

reorgnization done
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 11:55:54 +0900
parents 1d019706d866
children 2e18cbf3894f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 include "llvm/Option/OptParser.td"
anatofuz
parents:
diff changeset
2
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
3 // Convenience classes for long options which only accept two dashes. For lld
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
4 // specific or newer long options, we prefer two dashes to avoid collision with
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
5 // short options. For many others, we have to accept both forms to be compatible
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
6 // with GNU ld.
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
7 class FF<string name> : Flag<["--"], name>;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
8 class JJ<string name>: Joined<["--"], name>;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
9
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
10 multiclass EEq<string name, string help> {
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
11 def NAME: Separate<["--"], name>;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
12 def NAME # _eq: Joined<["--"], name # "=">, Alias<!cast<Separate>(NAME)>,
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
13 HelpText<help>;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
14 }
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
15
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
16 multiclass BB<string name, string help1, string help2> {
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
17 def NAME: Flag<["--"], name>, HelpText<help1>;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
18 def no_ # NAME: Flag<["--"], "no-" # name>, HelpText<help2>;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
19 }
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
20
150
anatofuz
parents:
diff changeset
21 // For options whose names are multiple letters, either one dash or
anatofuz
parents:
diff changeset
22 // two can precede the option name except those that start with 'o'.
anatofuz
parents:
diff changeset
23 class F<string name>: Flag<["--", "-"], name>;
anatofuz
parents:
diff changeset
24 class J<string name>: Joined<["--", "-"], name>;
anatofuz
parents:
diff changeset
25
anatofuz
parents:
diff changeset
26 multiclass Eq<string name, string help> {
anatofuz
parents:
diff changeset
27 def NAME: Separate<["--", "-"], name>;
anatofuz
parents:
diff changeset
28 def NAME # _eq: Joined<["--", "-"], name # "=">, Alias<!cast<Separate>(NAME)>,
anatofuz
parents:
diff changeset
29 HelpText<help>;
anatofuz
parents:
diff changeset
30 }
anatofuz
parents:
diff changeset
31
anatofuz
parents:
diff changeset
32 multiclass B<string name, string help1, string help2> {
anatofuz
parents:
diff changeset
33 def NAME: Flag<["--", "-"], name>, HelpText<help1>;
anatofuz
parents:
diff changeset
34 def no_ # NAME: Flag<["--", "-"], "no-" # name>, HelpText<help2>;
anatofuz
parents:
diff changeset
35 }
anatofuz
parents:
diff changeset
36
anatofuz
parents:
diff changeset
37 defm auxiliary: Eq<"auxiliary", "Set DT_AUXILIARY field to the specified name">;
anatofuz
parents:
diff changeset
38
anatofuz
parents:
diff changeset
39 def Bsymbolic: F<"Bsymbolic">, HelpText<"Bind defined symbols locally">;
anatofuz
parents:
diff changeset
40
anatofuz
parents:
diff changeset
41 def Bsymbolic_functions: F<"Bsymbolic-functions">,
anatofuz
parents:
diff changeset
42 HelpText<"Bind defined function symbols locally">;
anatofuz
parents:
diff changeset
43
anatofuz
parents:
diff changeset
44 def Bdynamic: F<"Bdynamic">, HelpText<"Link against shared libraries (default)">;
anatofuz
parents:
diff changeset
45
anatofuz
parents:
diff changeset
46 def Bstatic: F<"Bstatic">, HelpText<"Do not link against shared libraries">;
anatofuz
parents:
diff changeset
47
anatofuz
parents:
diff changeset
48 def build_id: F<"build-id">, HelpText<"Alias for --build-id=fast">;
anatofuz
parents:
diff changeset
49
anatofuz
parents:
diff changeset
50 def build_id_eq: J<"build-id=">, HelpText<"Generate build ID note">,
anatofuz
parents:
diff changeset
51 MetaVarName<"[fast,md5,sha1,uuid,0x<hexstring>]">;
anatofuz
parents:
diff changeset
52
anatofuz
parents:
diff changeset
53 defm check_sections: B<"check-sections",
anatofuz
parents:
diff changeset
54 "Check section addresses for overlaps (default)",
anatofuz
parents:
diff changeset
55 "Do not check section addresses for overlaps">;
anatofuz
parents:
diff changeset
56
anatofuz
parents:
diff changeset
57 defm compress_debug_sections:
anatofuz
parents:
diff changeset
58 Eq<"compress-debug-sections", "Compress DWARF debug sections">,
anatofuz
parents:
diff changeset
59 MetaVarName<"[none,zlib]">;
anatofuz
parents:
diff changeset
60
anatofuz
parents:
diff changeset
61 defm defsym: Eq<"defsym", "Define a symbol alias">, MetaVarName<"<symbol>=<value>">;
anatofuz
parents:
diff changeset
62
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
63 defm optimize_bb_jumps: BB<"optimize-bb-jumps",
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
64 "Remove direct jumps at the end to the next basic block",
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
65 "Do not remove any direct jumps at the end to the next basic block (default)">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
66
150
anatofuz
parents:
diff changeset
67 defm split_stack_adjust_size
anatofuz
parents:
diff changeset
68 : Eq<"split-stack-adjust-size",
anatofuz
parents:
diff changeset
69 "Specify adjustment to stack size when a split-stack function calls a "
anatofuz
parents:
diff changeset
70 "non-split-stack function">,
anatofuz
parents:
diff changeset
71 MetaVarName<"<value>">;
anatofuz
parents:
diff changeset
72
anatofuz
parents:
diff changeset
73 defm library_path:
anatofuz
parents:
diff changeset
74 Eq<"library-path", "Add a directory to the library search path">, MetaVarName<"<dir>">;
anatofuz
parents:
diff changeset
75
anatofuz
parents:
diff changeset
76 def O: JoinedOrSeparate<["-"], "O">, HelpText<"Optimize output file size">;
anatofuz
parents:
diff changeset
77
anatofuz
parents:
diff changeset
78 defm Tbss: Eq<"Tbss", "Same as --section-start with .bss as the sectionname">;
anatofuz
parents:
diff changeset
79
anatofuz
parents:
diff changeset
80 defm Tdata: Eq<"Tdata", "Same as --section-start with .data as the sectionname">;
anatofuz
parents:
diff changeset
81
anatofuz
parents:
diff changeset
82 defm Ttext: Eq<"Ttext", "Same as --section-start with .text as the sectionname">;
anatofuz
parents:
diff changeset
83
anatofuz
parents:
diff changeset
84 def Ttext_segment: Separate<["-", "--"], "Ttext-segment">;
anatofuz
parents:
diff changeset
85
anatofuz
parents:
diff changeset
86 defm allow_multiple_definition: B<"allow-multiple-definition",
anatofuz
parents:
diff changeset
87 "Allow multiple definitions",
anatofuz
parents:
diff changeset
88 "Do not allow multiple definitions (default)">;
anatofuz
parents:
diff changeset
89
anatofuz
parents:
diff changeset
90 defm allow_shlib_undefined: B<"allow-shlib-undefined",
anatofuz
parents:
diff changeset
91 "Allow unresolved references in shared libraries (default when linking a shared library)",
anatofuz
parents:
diff changeset
92 "Do not allow unresolved references in shared libraries (default when linking an executable)">;
anatofuz
parents:
diff changeset
93
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
94 defm apply_dynamic_relocs: BB<"apply-dynamic-relocs",
150
anatofuz
parents:
diff changeset
95 "Apply link-time values for dynamic relocations",
anatofuz
parents:
diff changeset
96 "Do not apply link-time values for dynamic relocations (default)">;
anatofuz
parents:
diff changeset
97
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
98 defm dependent_libraries: BB<"dependent-libraries",
150
anatofuz
parents:
diff changeset
99 "Process dependent library specifiers from input files (default)",
anatofuz
parents:
diff changeset
100 "Ignore dependent library specifiers from input files">;
anatofuz
parents:
diff changeset
101
anatofuz
parents:
diff changeset
102 defm as_needed: B<"as-needed",
anatofuz
parents:
diff changeset
103 "Only set DT_NEEDED for shared libraries if used",
anatofuz
parents:
diff changeset
104 "Always set DT_NEEDED for shared libraries (default)">;
anatofuz
parents:
diff changeset
105
anatofuz
parents:
diff changeset
106 defm call_graph_ordering_file:
anatofuz
parents:
diff changeset
107 Eq<"call-graph-ordering-file", "Layout sections to optimize the given callgraph">;
anatofuz
parents:
diff changeset
108
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
109 defm call_graph_profile_sort: BB<"call-graph-profile-sort",
150
anatofuz
parents:
diff changeset
110 "Reorder sections with call graph profile (default)",
anatofuz
parents:
diff changeset
111 "Do not reorder sections with call graph profile">;
anatofuz
parents:
diff changeset
112
anatofuz
parents:
diff changeset
113 // -chroot doesn't have a help text because it is an internal option.
anatofuz
parents:
diff changeset
114 def chroot: Separate<["--", "-"], "chroot">;
anatofuz
parents:
diff changeset
115
anatofuz
parents:
diff changeset
116 def color_diagnostics: F<"color-diagnostics">,
anatofuz
parents:
diff changeset
117 HelpText<"Alias for --color-diagnostics=always">;
anatofuz
parents:
diff changeset
118
anatofuz
parents:
diff changeset
119 def color_diagnostics_eq: J<"color-diagnostics=">,
anatofuz
parents:
diff changeset
120 HelpText<"Use colors in diagnostics">,
anatofuz
parents:
diff changeset
121 MetaVarName<"[auto,always,never]">;
anatofuz
parents:
diff changeset
122
anatofuz
parents:
diff changeset
123 defm cref: B<"cref",
anatofuz
parents:
diff changeset
124 "Output cross reference table",
anatofuz
parents:
diff changeset
125 "Do not output cross reference table">;
anatofuz
parents:
diff changeset
126
anatofuz
parents:
diff changeset
127 defm define_common: B<"define-common",
anatofuz
parents:
diff changeset
128 "Assign space to common symbols",
anatofuz
parents:
diff changeset
129 "Do not assign space to common symbols">;
anatofuz
parents:
diff changeset
130
anatofuz
parents:
diff changeset
131 defm demangle: B<"demangle",
anatofuz
parents:
diff changeset
132 "Demangle symbol names (default)",
anatofuz
parents:
diff changeset
133 "Do not demangle symbol names">;
anatofuz
parents:
diff changeset
134
anatofuz
parents:
diff changeset
135 def disable_new_dtags: F<"disable-new-dtags">,
anatofuz
parents:
diff changeset
136 HelpText<"Disable new dynamic tags">;
anatofuz
parents:
diff changeset
137
anatofuz
parents:
diff changeset
138 def discard_all: F<"discard-all">, HelpText<"Delete all local symbols">;
anatofuz
parents:
diff changeset
139
anatofuz
parents:
diff changeset
140 def discard_locals: F<"discard-locals">,
anatofuz
parents:
diff changeset
141 HelpText<"Delete temporary local symbols">;
anatofuz
parents:
diff changeset
142
anatofuz
parents:
diff changeset
143 def discard_none: F<"discard-none">,
anatofuz
parents:
diff changeset
144 HelpText<"Keep all symbols in the symbol table">;
anatofuz
parents:
diff changeset
145
anatofuz
parents:
diff changeset
146 defm dynamic_linker: Eq<"dynamic-linker", "Which dynamic linker to use">;
anatofuz
parents:
diff changeset
147
anatofuz
parents:
diff changeset
148 defm dynamic_list: Eq<"dynamic-list", "Read a list of dynamic symbols">;
anatofuz
parents:
diff changeset
149
anatofuz
parents:
diff changeset
150 defm eh_frame_hdr: B<"eh-frame-hdr",
anatofuz
parents:
diff changeset
151 "Request creation of .eh_frame_hdr section and PT_GNU_EH_FRAME segment header",
anatofuz
parents:
diff changeset
152 "Do not create .eh_frame_hdr section">;
anatofuz
parents:
diff changeset
153
anatofuz
parents:
diff changeset
154 def emit_relocs: F<"emit-relocs">, HelpText<"Generate relocations in output">;
anatofuz
parents:
diff changeset
155
anatofuz
parents:
diff changeset
156 def enable_new_dtags: F<"enable-new-dtags">,
anatofuz
parents:
diff changeset
157 HelpText<"Enable new dynamic tags (default)">;
anatofuz
parents:
diff changeset
158
anatofuz
parents:
diff changeset
159 def end_group: F<"end-group">,
anatofuz
parents:
diff changeset
160 HelpText<"Ignored for compatibility with GNU unless you pass --warn-backrefs">;
anatofuz
parents:
diff changeset
161
anatofuz
parents:
diff changeset
162 def end_lib: F<"end-lib">,
anatofuz
parents:
diff changeset
163 HelpText<"End a grouping of objects that should be treated as if they were together in an archive">;
anatofuz
parents:
diff changeset
164
anatofuz
parents:
diff changeset
165 defm entry: Eq<"entry", "Name of entry point symbol">,
anatofuz
parents:
diff changeset
166 MetaVarName<"<entry>">;
anatofuz
parents:
diff changeset
167
anatofuz
parents:
diff changeset
168 defm error_limit:
anatofuz
parents:
diff changeset
169 Eq<"error-limit", "Maximum number of errors to emit before stopping (0 = no limit)">;
anatofuz
parents:
diff changeset
170
anatofuz
parents:
diff changeset
171 def error_unresolved_symbols: F<"error-unresolved-symbols">,
anatofuz
parents:
diff changeset
172 HelpText<"Report unresolved symbols as errors">;
anatofuz
parents:
diff changeset
173
anatofuz
parents:
diff changeset
174 defm exclude_libs: Eq<"exclude-libs", "Exclude static libraries from automatic export">;
anatofuz
parents:
diff changeset
175
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
176 defm execute_only: BB<"execute-only",
150
anatofuz
parents:
diff changeset
177 "Mark executable sections unreadable",
anatofuz
parents:
diff changeset
178 "Mark executable sections readable (default)">;
anatofuz
parents:
diff changeset
179
anatofuz
parents:
diff changeset
180 defm export_dynamic: B<"export-dynamic",
anatofuz
parents:
diff changeset
181 "Put symbols in the dynamic symbol table",
anatofuz
parents:
diff changeset
182 "Do not put symbols in the dynamic symbol table (default)">;
anatofuz
parents:
diff changeset
183
anatofuz
parents:
diff changeset
184 defm export_dynamic_symbol:
anatofuz
parents:
diff changeset
185 Eq<"export-dynamic-symbol", "Put a symbol in the dynamic symbol table">;
anatofuz
parents:
diff changeset
186
anatofuz
parents:
diff changeset
187 defm fatal_warnings: B<"fatal-warnings",
anatofuz
parents:
diff changeset
188 "Treat warnings as errors",
anatofuz
parents:
diff changeset
189 "Do not treat warnings as errors (default)">;
anatofuz
parents:
diff changeset
190
anatofuz
parents:
diff changeset
191 defm filter: Eq<"filter", "Set DT_FILTER field to the specified name">;
anatofuz
parents:
diff changeset
192
anatofuz
parents:
diff changeset
193 defm fini: Eq<"fini", "Specify a finalizer function">, MetaVarName<"<symbol>">;
anatofuz
parents:
diff changeset
194
anatofuz
parents:
diff changeset
195 def fix_cortex_a53_843419: F<"fix-cortex-a53-843419">,
anatofuz
parents:
diff changeset
196 HelpText<"Apply fixes for AArch64 Cortex-A53 erratum 843419">;
anatofuz
parents:
diff changeset
197
anatofuz
parents:
diff changeset
198 def fix_cortex_a8: F<"fix-cortex-a8">,
anatofuz
parents:
diff changeset
199 HelpText<"Apply fixes for ARM Cortex-A8 erratum 657417">;
anatofuz
parents:
diff changeset
200
anatofuz
parents:
diff changeset
201 defm format: Eq<"format", "Change the input format of the inputs following this option">,
anatofuz
parents:
diff changeset
202 MetaVarName<"[default,elf,binary]">;
anatofuz
parents:
diff changeset
203
anatofuz
parents:
diff changeset
204 defm gc_sections: B<"gc-sections",
anatofuz
parents:
diff changeset
205 "Enable garbage collection of unused sections",
anatofuz
parents:
diff changeset
206 "Disable garbage collection of unused sections (default)">;
anatofuz
parents:
diff changeset
207
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
208 defm gdb_index: BB<"gdb-index",
150
anatofuz
parents:
diff changeset
209 "Generate .gdb_index section",
anatofuz
parents:
diff changeset
210 "Do not generate .gdb_index section (default)">;
anatofuz
parents:
diff changeset
211
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
212 defm gnu_unique: BB<"gnu-unique",
150
anatofuz
parents:
diff changeset
213 "Enable STB_GNU_UNIQUE symbol binding (default)",
anatofuz
parents:
diff changeset
214 "Disable STB_GNU_UNIQUE symbol binding">;
anatofuz
parents:
diff changeset
215
anatofuz
parents:
diff changeset
216 defm hash_style: Eq<"hash-style", "Specify hash style (sysv, gnu or both)">;
anatofuz
parents:
diff changeset
217
anatofuz
parents:
diff changeset
218 def help: F<"help">, HelpText<"Print option help">;
anatofuz
parents:
diff changeset
219
anatofuz
parents:
diff changeset
220 def icf_all: F<"icf=all">, HelpText<"Enable identical code folding">;
anatofuz
parents:
diff changeset
221
anatofuz
parents:
diff changeset
222 def icf_safe: F<"icf=safe">, HelpText<"Enable safe identical code folding">;
anatofuz
parents:
diff changeset
223
anatofuz
parents:
diff changeset
224 def icf_none: F<"icf=none">, HelpText<"Disable identical code folding (default)">;
anatofuz
parents:
diff changeset
225
anatofuz
parents:
diff changeset
226 def ignore_function_address_equality: F<"ignore-function-address-equality">,
anatofuz
parents:
diff changeset
227 HelpText<"lld can break the address equality of functions">;
anatofuz
parents:
diff changeset
228
anatofuz
parents:
diff changeset
229 def ignore_data_address_equality: F<"ignore-data-address-equality">,
anatofuz
parents:
diff changeset
230 HelpText<"lld can break the address equality of data">;
anatofuz
parents:
diff changeset
231
anatofuz
parents:
diff changeset
232 defm image_base: Eq<"image-base", "Set the base address">;
anatofuz
parents:
diff changeset
233
anatofuz
parents:
diff changeset
234 defm init: Eq<"init", "Specify an initializer function">,
anatofuz
parents:
diff changeset
235 MetaVarName<"<symbol>">;
anatofuz
parents:
diff changeset
236
anatofuz
parents:
diff changeset
237 defm just_symbols: Eq<"just-symbols", "Just link symbols">;
anatofuz
parents:
diff changeset
238
anatofuz
parents:
diff changeset
239 defm keep_unique: Eq<"keep-unique", "Do not fold this symbol during ICF">;
anatofuz
parents:
diff changeset
240
anatofuz
parents:
diff changeset
241 defm library: Eq<"library", "Root name of library to use">,
anatofuz
parents:
diff changeset
242 MetaVarName<"<libName>">;
anatofuz
parents:
diff changeset
243
anatofuz
parents:
diff changeset
244 def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">;
anatofuz
parents:
diff changeset
245
anatofuz
parents:
diff changeset
246 defm Map: Eq<"Map", "Print a link map to the specified file">;
anatofuz
parents:
diff changeset
247
anatofuz
parents:
diff changeset
248 defm merge_exidx_entries: B<"merge-exidx-entries",
anatofuz
parents:
diff changeset
249 "Enable merging .ARM.exidx entries (default)",
anatofuz
parents:
diff changeset
250 "Disable merging .ARM.exidx entries">;
anatofuz
parents:
diff changeset
251
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
252 defm mmap_output_file: BB<"mmap-output-file",
150
anatofuz
parents:
diff changeset
253 "Mmap the output file for writing (default)",
anatofuz
parents:
diff changeset
254 "Do not mmap the output file for writing">;
anatofuz
parents:
diff changeset
255
anatofuz
parents:
diff changeset
256 def nmagic: F<"nmagic">, MetaVarName<"<magic>">,
anatofuz
parents:
diff changeset
257 HelpText<"Do not page align sections, link against static libraries.">;
anatofuz
parents:
diff changeset
258
anatofuz
parents:
diff changeset
259 def nostdlib: F<"nostdlib">,
anatofuz
parents:
diff changeset
260 HelpText<"Only search directories specified on the command line">;
anatofuz
parents:
diff changeset
261
anatofuz
parents:
diff changeset
262 def no_color_diagnostics: F<"no-color-diagnostics">,
anatofuz
parents:
diff changeset
263 HelpText<"Do not use colors in diagnostics">;
anatofuz
parents:
diff changeset
264
anatofuz
parents:
diff changeset
265 def no_dynamic_linker: F<"no-dynamic-linker">,
anatofuz
parents:
diff changeset
266 HelpText<"Inhibit output of .interp section">;
anatofuz
parents:
diff changeset
267
anatofuz
parents:
diff changeset
268 def noinhibit_exec: F<"noinhibit-exec">,
anatofuz
parents:
diff changeset
269 HelpText<"Retain the executable output file whenever it is still usable">;
anatofuz
parents:
diff changeset
270
anatofuz
parents:
diff changeset
271 def no_nmagic: F<"no-nmagic">, MetaVarName<"<magic>">,
anatofuz
parents:
diff changeset
272 HelpText<"Page align sections (default)">;
anatofuz
parents:
diff changeset
273
anatofuz
parents:
diff changeset
274 def no_omagic: F<"no-omagic">, MetaVarName<"<magic>">,
anatofuz
parents:
diff changeset
275 HelpText<"Do not set the text data sections to be writable, page align sections (default)">;
anatofuz
parents:
diff changeset
276
anatofuz
parents:
diff changeset
277 def no_undefined: F<"no-undefined">,
anatofuz
parents:
diff changeset
278 HelpText<"Report unresolved symbols even if the linker is creating a shared library">;
anatofuz
parents:
diff changeset
279
anatofuz
parents:
diff changeset
280 def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">,
anatofuz
parents:
diff changeset
281 HelpText<"Path to file to write output">;
anatofuz
parents:
diff changeset
282
anatofuz
parents:
diff changeset
283 def oformat: Separate<["--"], "oformat">, MetaVarName<"<format>">,
anatofuz
parents:
diff changeset
284 HelpText<"Specify the binary format for the output object file">;
anatofuz
parents:
diff changeset
285
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
286 def omagic: FF<"omagic">, MetaVarName<"<magic>">,
150
anatofuz
parents:
diff changeset
287 HelpText<"Set the text and data sections to be readable and writable, do not page align sections, link against static libraries">;
anatofuz
parents:
diff changeset
288
anatofuz
parents:
diff changeset
289 defm orphan_handling:
anatofuz
parents:
diff changeset
290 Eq<"orphan-handling", "Control how orphan sections are handled when linker script used">;
anatofuz
parents:
diff changeset
291
anatofuz
parents:
diff changeset
292 defm pack_dyn_relocs:
anatofuz
parents:
diff changeset
293 Eq<"pack-dyn-relocs", "Pack dynamic relocations in the given format">,
anatofuz
parents:
diff changeset
294 MetaVarName<"[none,android,relr,android+relr]">;
anatofuz
parents:
diff changeset
295
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
296 defm use_android_relr_tags: BB<"use-android-relr-tags",
150
anatofuz
parents:
diff changeset
297 "Use SHT_ANDROID_RELR / DT_ANDROID_RELR* tags instead of SHT_RELR / DT_RELR*",
anatofuz
parents:
diff changeset
298 "Use SHT_RELR / DT_RELR* tags (default)">;
anatofuz
parents:
diff changeset
299
anatofuz
parents:
diff changeset
300 def pic_veneer: F<"pic-veneer">,
anatofuz
parents:
diff changeset
301 HelpText<"Always generate position independent thunks (veneers)">;
anatofuz
parents:
diff changeset
302
anatofuz
parents:
diff changeset
303 defm pie: B<"pie",
anatofuz
parents:
diff changeset
304 "Create a position independent executable",
anatofuz
parents:
diff changeset
305 "Do not create a position independent executable (default)">;
anatofuz
parents:
diff changeset
306
anatofuz
parents:
diff changeset
307 defm print_gc_sections: B<"print-gc-sections",
anatofuz
parents:
diff changeset
308 "List removed unused sections",
anatofuz
parents:
diff changeset
309 "Do not list removed unused sections (default)">;
anatofuz
parents:
diff changeset
310
anatofuz
parents:
diff changeset
311 defm print_icf_sections: B<"print-icf-sections",
anatofuz
parents:
diff changeset
312 "List identical folded sections",
anatofuz
parents:
diff changeset
313 "Do not list identical folded sections (default)">;
anatofuz
parents:
diff changeset
314
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
315 def print_archive_stats: J<"print-archive-stats=">,
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
316 HelpText<"Write archive usage statistics to the specified file. "
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
317 "Print the numbers of members and fetched members for each archive">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
318
150
anatofuz
parents:
diff changeset
319 defm print_symbol_order: Eq<"print-symbol-order",
anatofuz
parents:
diff changeset
320 "Print a symbol order specified by --call-graph-ordering-file into the specified file">;
anatofuz
parents:
diff changeset
321
anatofuz
parents:
diff changeset
322 def pop_state: F<"pop-state">,
anatofuz
parents:
diff changeset
323 HelpText<"Undo the effect of -push-state">;
anatofuz
parents:
diff changeset
324
anatofuz
parents:
diff changeset
325 def push_state: F<"push-state">,
anatofuz
parents:
diff changeset
326 HelpText<"Save the current state of -as-needed, -static and -whole-archive">;
anatofuz
parents:
diff changeset
327
anatofuz
parents:
diff changeset
328 def print_map: F<"print-map">,
anatofuz
parents:
diff changeset
329 HelpText<"Print a link map to the standard output">;
anatofuz
parents:
diff changeset
330
anatofuz
parents:
diff changeset
331 defm reproduce: Eq<"reproduce", "Write a tar file containing input files and command line options to reproduce link">;
anatofuz
parents:
diff changeset
332
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
333 defm rosegment: BB<"rosegment",
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
334 "Put read-only non-executable sections in their own segment (default)",
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
335 "Do not put read-only non-executable sections in their own segment">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
336
150
anatofuz
parents:
diff changeset
337 defm rpath: Eq<"rpath", "Add a DT_RUNPATH to the output">;
anatofuz
parents:
diff changeset
338
anatofuz
parents:
diff changeset
339 def relocatable: F<"relocatable">, HelpText<"Create relocatable object file">;
anatofuz
parents:
diff changeset
340
anatofuz
parents:
diff changeset
341 defm retain_symbols_file:
anatofuz
parents:
diff changeset
342 Eq<"retain-symbols-file", "Retain only the symbols listed in the file">,
anatofuz
parents:
diff changeset
343 MetaVarName<"<file>">;
anatofuz
parents:
diff changeset
344
anatofuz
parents:
diff changeset
345 defm script: Eq<"script", "Read linker script">;
anatofuz
parents:
diff changeset
346
anatofuz
parents:
diff changeset
347 defm section_start: Eq<"section-start", "Set address of section">,
anatofuz
parents:
diff changeset
348 MetaVarName<"<address>">;
anatofuz
parents:
diff changeset
349
anatofuz
parents:
diff changeset
350 def shared: F<"shared">, HelpText<"Build a shared object">;
anatofuz
parents:
diff changeset
351
anatofuz
parents:
diff changeset
352 defm soname: Eq<"soname", "Set DT_SONAME">;
anatofuz
parents:
diff changeset
353
anatofuz
parents:
diff changeset
354 defm sort_section:
anatofuz
parents:
diff changeset
355 Eq<"sort-section", "Specifies sections sorting rule when linkerscript is used">;
anatofuz
parents:
diff changeset
356
anatofuz
parents:
diff changeset
357 def start_group: F<"start-group">,
anatofuz
parents:
diff changeset
358 HelpText<"Ignored for compatibility with GNU unless you pass --warn-backrefs">;
anatofuz
parents:
diff changeset
359
anatofuz
parents:
diff changeset
360 def start_lib: F<"start-lib">,
anatofuz
parents:
diff changeset
361 HelpText<"Start a grouping of objects that should be treated as if they were together in an archive">;
anatofuz
parents:
diff changeset
362
anatofuz
parents:
diff changeset
363 def strip_all: F<"strip-all">, HelpText<"Strip all symbols">;
anatofuz
parents:
diff changeset
364
anatofuz
parents:
diff changeset
365 def strip_debug: F<"strip-debug">, HelpText<"Strip debugging information">;
anatofuz
parents:
diff changeset
366
anatofuz
parents:
diff changeset
367 defm symbol_ordering_file:
anatofuz
parents:
diff changeset
368 Eq<"symbol-ordering-file", "Layout sections to place symbols in the order specified by symbol ordering file">;
anatofuz
parents:
diff changeset
369
anatofuz
parents:
diff changeset
370 defm sysroot: Eq<"sysroot", "Set the system root">;
anatofuz
parents:
diff changeset
371
anatofuz
parents:
diff changeset
372 def target1_rel: F<"target1-rel">, HelpText<"Interpret R_ARM_TARGET1 as R_ARM_REL32">;
anatofuz
parents:
diff changeset
373
anatofuz
parents:
diff changeset
374 def target1_abs: F<"target1-abs">, HelpText<"Interpret R_ARM_TARGET1 as R_ARM_ABS32 (default)">;
anatofuz
parents:
diff changeset
375
anatofuz
parents:
diff changeset
376 defm target2:
anatofuz
parents:
diff changeset
377 Eq<"target2", "Interpret R_ARM_TARGET2 as <type>, where <type> is one of rel, abs, or got-rel">,
anatofuz
parents:
diff changeset
378 MetaVarName<"<type>">;
anatofuz
parents:
diff changeset
379
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
380 defm threads
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
381 : Eq<"threads",
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
382 "Number of threads. '1' disables multi-threading. By default all "
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
383 "available hardware threads are used">;
150
anatofuz
parents:
diff changeset
384
anatofuz
parents:
diff changeset
385 def time_trace: F<"time-trace">, HelpText<"Record time trace">;
anatofuz
parents:
diff changeset
386 def time_trace_file_eq: J<"time-trace-file=">, HelpText<"Specify time trace output file">;
anatofuz
parents:
diff changeset
387
anatofuz
parents:
diff changeset
388 defm time_trace_granularity: Eq<"time-trace-granularity",
anatofuz
parents:
diff changeset
389 "Minimum time granularity (in microseconds) traced by time profiler">;
anatofuz
parents:
diff changeset
390
anatofuz
parents:
diff changeset
391 defm toc_optimize : B<"toc-optimize",
anatofuz
parents:
diff changeset
392 "(PowerPC64) Enable TOC related optimizations (default)",
anatofuz
parents:
diff changeset
393 "(PowerPC64) Disable TOC related optimizations">;
anatofuz
parents:
diff changeset
394
anatofuz
parents:
diff changeset
395 def trace: F<"trace">, HelpText<"Print the names of the input files">;
anatofuz
parents:
diff changeset
396
anatofuz
parents:
diff changeset
397 defm trace_symbol: Eq<"trace-symbol", "Trace references to symbols">;
anatofuz
parents:
diff changeset
398
anatofuz
parents:
diff changeset
399 defm undefined: Eq<"undefined", "Force undefined symbol during linking">,
anatofuz
parents:
diff changeset
400 MetaVarName<"<symbol>">;
anatofuz
parents:
diff changeset
401
anatofuz
parents:
diff changeset
402 defm undefined_glob: Eq<"undefined-glob", "Force undefined symbol during linking">,
anatofuz
parents:
diff changeset
403 MetaVarName<"<pattern>">;
anatofuz
parents:
diff changeset
404
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
405 def unique: F<"unique">, HelpText<"Creates a separate output section for every orphan input section">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
406
150
anatofuz
parents:
diff changeset
407 defm unresolved_symbols:
anatofuz
parents:
diff changeset
408 Eq<"unresolved-symbols", "Determine how to handle unresolved symbols">;
anatofuz
parents:
diff changeset
409
anatofuz
parents:
diff changeset
410 defm undefined_version: B<"undefined-version",
anatofuz
parents:
diff changeset
411 "Allow unused version in version script (default)",
anatofuz
parents:
diff changeset
412 "Report version scripts that refer undefined symbols">;
anatofuz
parents:
diff changeset
413
anatofuz
parents:
diff changeset
414 defm rsp_quoting: Eq<"rsp-quoting", "Quoting style for response files">,
anatofuz
parents:
diff changeset
415 MetaVarName<"[posix,windows]">;
anatofuz
parents:
diff changeset
416
anatofuz
parents:
diff changeset
417 def v: Flag<["-"], "v">, HelpText<"Display the version number">;
anatofuz
parents:
diff changeset
418
anatofuz
parents:
diff changeset
419 def verbose: F<"verbose">, HelpText<"Verbose mode">;
anatofuz
parents:
diff changeset
420
anatofuz
parents:
diff changeset
421 def version: F<"version">, HelpText<"Display the version number and exit">;
anatofuz
parents:
diff changeset
422
anatofuz
parents:
diff changeset
423 defm version_script: Eq<"version-script", "Read a version script">;
anatofuz
parents:
diff changeset
424
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
425 defm warn_backrefs: BB<"warn-backrefs",
150
anatofuz
parents:
diff changeset
426 "Warn about backward symbol references to fetch archive members",
anatofuz
parents:
diff changeset
427 "Do not warn about backward symbol references to fetch archive members (default)">;
anatofuz
parents:
diff changeset
428
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
429 defm warn_backrefs_exclude
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
430 : Eq<"warn-backrefs-exclude",
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
431 "Glob describing an archive (or an object file within --start-lib) "
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
432 "which should be ignored for --warn-backrefs.">,
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
433 MetaVarName<"<glob>">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
434
150
anatofuz
parents:
diff changeset
435 defm warn_common: B<"warn-common",
anatofuz
parents:
diff changeset
436 "Warn about duplicate common symbols",
anatofuz
parents:
diff changeset
437 "Do not warn about duplicate common symbols (default)">;
anatofuz
parents:
diff changeset
438
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
439 defm warn_ifunc_textrel: BB<"warn-ifunc-textrel",
150
anatofuz
parents:
diff changeset
440 "Warn about using ifunc symbols with text relocations",
anatofuz
parents:
diff changeset
441 "Do not warn about using ifunc symbols with text relocations (default)">;
anatofuz
parents:
diff changeset
442
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
443 defm warn_symbol_ordering: BB<"warn-symbol-ordering",
150
anatofuz
parents:
diff changeset
444 "Warn about problems with the symbol ordering file (default)",
anatofuz
parents:
diff changeset
445 "Do not warn about problems with the symbol ordering file">;
anatofuz
parents:
diff changeset
446
anatofuz
parents:
diff changeset
447 def warn_unresolved_symbols: F<"warn-unresolved-symbols">,
anatofuz
parents:
diff changeset
448 HelpText<"Report unresolved symbols as warnings">;
anatofuz
parents:
diff changeset
449
anatofuz
parents:
diff changeset
450 defm whole_archive: B<"whole-archive",
anatofuz
parents:
diff changeset
451 "Force load of all members in a static library",
anatofuz
parents:
diff changeset
452 "Do not force load of all members in a static library (default)">;
anatofuz
parents:
diff changeset
453
anatofuz
parents:
diff changeset
454 defm wrap: Eq<"wrap", "Use wrapper functions for symbol">,
anatofuz
parents:
diff changeset
455 MetaVarName<"<symbol>=<symbol>">;
anatofuz
parents:
diff changeset
456
anatofuz
parents:
diff changeset
457 def z: JoinedOrSeparate<["-"], "z">, MetaVarName<"<option>">,
anatofuz
parents:
diff changeset
458 HelpText<"Linker option extensions">;
anatofuz
parents:
diff changeset
459
anatofuz
parents:
diff changeset
460 def visual_studio_diagnostics_format : F<"vs-diagnostics">,
anatofuz
parents:
diff changeset
461 HelpText<"Format diagnostics for Visual Studio compatibility">;
anatofuz
parents:
diff changeset
462
anatofuz
parents:
diff changeset
463 // Aliases
anatofuz
parents:
diff changeset
464 def: Separate<["-"], "f">, Alias<auxiliary>, HelpText<"Alias for --auxiliary">;
anatofuz
parents:
diff changeset
465 def: F<"call_shared">, Alias<Bdynamic>, HelpText<"Alias for --Bdynamic">;
anatofuz
parents:
diff changeset
466 def: F<"dy">, Alias<Bdynamic>, HelpText<"Alias for --Bdynamic">;
anatofuz
parents:
diff changeset
467 def: F<"dn">, Alias<Bstatic>, HelpText<"Alias for --Bstatic">;
anatofuz
parents:
diff changeset
468 def: F<"non_shared">, Alias<Bstatic>, HelpText<"Alias for --Bstatic">;
anatofuz
parents:
diff changeset
469 def: F<"static">, Alias<Bstatic>, HelpText<"Alias for --Bstatic">;
anatofuz
parents:
diff changeset
470 def: Flag<["-"], "d">, Alias<define_common>, HelpText<"Alias for --define-common">;
anatofuz
parents:
diff changeset
471 def: F<"dc">, Alias<define_common>, HelpText<"Alias for --define-common">;
anatofuz
parents:
diff changeset
472 def: F<"dp">, Alias<define_common>, HelpText<"Alias for --define-common">;
anatofuz
parents:
diff changeset
473 def: Flag<["-"], "x">, Alias<discard_all>, HelpText<"Alias for --discard-all">;
anatofuz
parents:
diff changeset
474 def: Flag<["-"], "X">, Alias<discard_locals>, HelpText<"Alias for --discard-locals">;
anatofuz
parents:
diff changeset
475 def: Flag<["-"], "q">, Alias<emit_relocs>, HelpText<"Alias for --emit-relocs">;
anatofuz
parents:
diff changeset
476 def: Flag<["-"], ")">, Alias<end_group>, HelpText<"Alias for --end-group">;
anatofuz
parents:
diff changeset
477 def: JoinedOrSeparate<["-"], "e">, Alias<entry>, HelpText<"Alias for --entry">;
anatofuz
parents:
diff changeset
478 def: Flag<["-"], "E">, Alias<export_dynamic>, HelpText<"Alias for --export-dynamic">;
anatofuz
parents:
diff changeset
479 def: Separate<["-"], "F">, Alias<filter>, HelpText<"Alias for --filter">;
anatofuz
parents:
diff changeset
480 def: Separate<["-"], "b">, Alias<format>, HelpText<"Alias for --format">;
anatofuz
parents:
diff changeset
481 def: JoinedOrSeparate<["-"], "l">, Alias<library>, HelpText<"Alias for --library">;
anatofuz
parents:
diff changeset
482 def: JoinedOrSeparate<["-"], "L">, Alias<library_path>, HelpText<"Alias for --library-path">;
anatofuz
parents:
diff changeset
483 def: F<"no-pic-executable">, Alias<no_pie>, HelpText<"Alias for --no-pie">;
anatofuz
parents:
diff changeset
484 def: Flag<["-"], "n">, Alias<nmagic>, HelpText<"Alias for --nmagic">;
anatofuz
parents:
diff changeset
485 def: Flag<["-"], "N">, Alias<omagic>, HelpText<"Alias for --omagic">;
anatofuz
parents:
diff changeset
486 def: Joined<["--"], "output=">, Alias<o>, HelpText<"Alias for -o">;
anatofuz
parents:
diff changeset
487 def: Separate<["--"], "output">, Alias<o>, HelpText<"Alias for -o">;
anatofuz
parents:
diff changeset
488 def: F<"pic-executable">, Alias<pie>, HelpText<"Alias for --pie">;
anatofuz
parents:
diff changeset
489 def: Flag<["-"], "M">, Alias<print_map>, HelpText<"Alias for --print-map">;
anatofuz
parents:
diff changeset
490 def: Flag<["-"], "r">, Alias<relocatable>, HelpText<"Alias for --relocatable">;
anatofuz
parents:
diff changeset
491 def: JoinedOrSeparate<["-"], "R">, Alias<rpath>, HelpText<"Alias for --rpath">;
anatofuz
parents:
diff changeset
492 def: JoinedOrSeparate<["-"], "T">, Alias<script>, HelpText<"Alias for --script">;
anatofuz
parents:
diff changeset
493 def: F<"Bshareable">, Alias<shared>, HelpText<"Alias for --shared">;
anatofuz
parents:
diff changeset
494 def: JoinedOrSeparate<["-"], "h">, Alias<soname>, HelpText<"Alias for --soname">;
anatofuz
parents:
diff changeset
495 def: Flag<["-"], "(">, Alias<start_group>, HelpText<"Alias for --start-group">;
anatofuz
parents:
diff changeset
496 def: Flag<["-"], "s">, Alias<strip_all>, HelpText<"Alias for --strip-all">;
anatofuz
parents:
diff changeset
497 def: Flag<["-"], "S">, Alias<strip_debug>, HelpText<"Alias for --strip-debug">;
anatofuz
parents:
diff changeset
498 def: Flag<["-"], "t">, Alias<trace>, HelpText<"Alias for --trace">;
anatofuz
parents:
diff changeset
499 def: Joined<["-", "--"], "Ttext-segment=">, Alias<Ttext_segment>;
anatofuz
parents:
diff changeset
500 def: JoinedOrSeparate<["-"], "y">, Alias<trace_symbol>, HelpText<"Alias for --trace-symbol">;
anatofuz
parents:
diff changeset
501 def: JoinedOrSeparate<["-"], "u">, Alias<undefined>, HelpText<"Alias for --undefined">;
anatofuz
parents:
diff changeset
502 def: Flag<["-"], "V">, Alias<version>, HelpText<"Alias for --version">;
anatofuz
parents:
diff changeset
503
anatofuz
parents:
diff changeset
504 // LTO-related options.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
505 def lto_aa_pipeline: JJ<"lto-aa-pipeline=">,
150
anatofuz
parents:
diff changeset
506 HelpText<"AA pipeline to run during LTO. Used in conjunction with -lto-newpm-passes">;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
507 def lto_debug_pass_manager: FF<"lto-debug-pass-manager">,
150
anatofuz
parents:
diff changeset
508 HelpText<"Debug new pass manager">;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
509 def lto_emit_asm: FF<"lto-emit-asm">,
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
510 HelpText<"Emit assembly code">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
511 def lto_new_pass_manager: FF<"lto-new-pass-manager">,
150
anatofuz
parents:
diff changeset
512 HelpText<"Use new pass manager">;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
513 def lto_newpm_passes: JJ<"lto-newpm-passes=">,
150
anatofuz
parents:
diff changeset
514 HelpText<"Passes to run during LTO">;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
515 def lto_O: JJ<"lto-O">, MetaVarName<"<opt-level>">,
150
anatofuz
parents:
diff changeset
516 HelpText<"Optimization level for LTO">;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
517 def lto_partitions: JJ<"lto-partitions=">,
150
anatofuz
parents:
diff changeset
518 HelpText<"Number of LTO codegen partitions">;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
519 def lto_cs_profile_generate: FF<"lto-cs-profile-generate">,
150
anatofuz
parents:
diff changeset
520 HelpText<"Perform context sensitive PGO instrumentation">;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
521 def lto_cs_profile_file: JJ<"lto-cs-profile-file=">,
150
anatofuz
parents:
diff changeset
522 HelpText<"Context sensitive profile file path">;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
523 def lto_obj_path_eq: JJ<"lto-obj-path=">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
524 def lto_sample_profile: JJ<"lto-sample-profile=">,
150
anatofuz
parents:
diff changeset
525 HelpText<"Sample profile file path">;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
526 def lto_whole_program_visibility: FF<"lto-whole-program-visibility">,
150
anatofuz
parents:
diff changeset
527 HelpText<"Asserts that the LTO link has whole program visibility">;
anatofuz
parents:
diff changeset
528 def disable_verify: F<"disable-verify">;
anatofuz
parents:
diff changeset
529 defm mllvm: Eq<"mllvm", "Additional arguments to forward to LLVM's option processing">;
anatofuz
parents:
diff changeset
530 def opt_remarks_filename: Separate<["--"], "opt-remarks-filename">,
anatofuz
parents:
diff changeset
531 HelpText<"YAML output file for optimization remarks">;
anatofuz
parents:
diff changeset
532 def opt_remarks_passes: Separate<["--"], "opt-remarks-passes">,
anatofuz
parents:
diff changeset
533 HelpText<"Regex for the passes that need to be serialized to the output file">;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
534 def opt_remarks_with_hotness: FF<"opt-remarks-with-hotness">,
150
anatofuz
parents:
diff changeset
535 HelpText<"Include hotness information in the optimization remarks file">;
anatofuz
parents:
diff changeset
536 def opt_remarks_format: Separate<["--"], "opt-remarks-format">,
anatofuz
parents:
diff changeset
537 HelpText<"The format used for serializing remarks (default: YAML)">;
anatofuz
parents:
diff changeset
538 def save_temps: F<"save-temps">;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
539 def lto_basicblock_sections: JJ<"lto-basicblock-sections=">,
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
540 HelpText<"Enable basic block sections for LTO">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
541 defm lto_unique_bb_section_names: BB<"lto-unique-bb-section-names",
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
542 "Give unique names to every basic block section for LTO",
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
543 "Do not give unique names to every basic block section for LTO (default)">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
544 def shuffle_sections: JJ<"shuffle-sections=">, MetaVarName<"<seed>">,
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
545 HelpText<"Shuffle input sections using the given seed. If 0, use a random seed">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
546 def thinlto_cache_dir: JJ<"thinlto-cache-dir=">,
150
anatofuz
parents:
diff changeset
547 HelpText<"Path to ThinLTO cached object file directory">;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
548 defm thinlto_cache_policy: EEq<"thinlto-cache-policy", "Pruning policy for the ThinLTO cache">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
549 def thinlto_emit_imports_files: FF<"thinlto-emit-imports-files">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
550 def thinlto_index_only: FF<"thinlto-index-only">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
551 def thinlto_index_only_eq: JJ<"thinlto-index-only=">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
552 def thinlto_jobs: JJ<"thinlto-jobs=">,
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
553 HelpText<"Number of ThinLTO jobs. Default to --threads=">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
554 def thinlto_object_suffix_replace_eq: JJ<"thinlto-object-suffix-replace=">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
555 def thinlto_prefix_replace_eq: JJ<"thinlto-prefix-replace=">;
150
anatofuz
parents:
diff changeset
556
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
557 def: J<"plugin-opt=O">, Alias<lto_O>, HelpText<"Alias for --lto-O">;
150
anatofuz
parents:
diff changeset
558 def: F<"plugin-opt=debug-pass-manager">,
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
559 Alias<lto_debug_pass_manager>, HelpText<"Alias for --lto-debug-pass-manager">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
560 def: F<"plugin-opt=disable-verify">, Alias<disable_verify>, HelpText<"Alias for --disable-verify">;
150
anatofuz
parents:
diff changeset
561 def plugin_opt_dwo_dir_eq: J<"plugin-opt=dwo_dir=">,
anatofuz
parents:
diff changeset
562 HelpText<"Directory to store .dwo files when LTO and debug fission are used">;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
563 def plugin_opt_emit_asm: F<"plugin-opt=emit-asm">,
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
564 Alias<lto_emit_asm>, HelpText<"Alias for --lto-emit-asm">;
150
anatofuz
parents:
diff changeset
565 def plugin_opt_emit_llvm: F<"plugin-opt=emit-llvm">;
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
566 def: J<"plugin-opt=jobs=">, Alias<thinlto_jobs>, HelpText<"Alias for --thinlto-jobs">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
567 def: J<"plugin-opt=lto-partitions=">, Alias<lto_partitions>, HelpText<"Alias for --lto-partitions">;
150
anatofuz
parents:
diff changeset
568 def plugin_opt_mcpu_eq: J<"plugin-opt=mcpu=">;
anatofuz
parents:
diff changeset
569 def: F<"plugin-opt=new-pass-manager">,
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
570 Alias<lto_new_pass_manager>, HelpText<"Alias for --lto-new-pass-manager">;
150
anatofuz
parents:
diff changeset
571 def: F<"plugin-opt=cs-profile-generate">,
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
572 Alias<lto_cs_profile_generate>, HelpText<"Alias for --lto-cs-profile-generate">;
150
anatofuz
parents:
diff changeset
573 def: J<"plugin-opt=cs-profile-path=">,
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
574 Alias<lto_cs_profile_file>, HelpText<"Alias for --lto-cs-profile-file">;
150
anatofuz
parents:
diff changeset
575 def: J<"plugin-opt=obj-path=">,
anatofuz
parents:
diff changeset
576 Alias<lto_obj_path_eq>,
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
577 HelpText<"Alias for --lto-obj-path=">;
150
anatofuz
parents:
diff changeset
578 def: J<"plugin-opt=sample-profile=">,
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
579 Alias<lto_sample_profile>, HelpText<"Alias for --lto-sample-profile">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
580 def: F<"plugin-opt=save-temps">, Alias<save_temps>, HelpText<"Alias for --save-temps">;
150
anatofuz
parents:
diff changeset
581 def: F<"plugin-opt=thinlto-emit-imports-files">,
anatofuz
parents:
diff changeset
582 Alias<thinlto_emit_imports_files>,
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
583 HelpText<"Alias for --thinlto-emit-imports-files">;
150
anatofuz
parents:
diff changeset
584 def: F<"plugin-opt=thinlto-index-only">,
anatofuz
parents:
diff changeset
585 Alias<thinlto_index_only>,
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
586 HelpText<"Alias for --thinlto-index-only">;
150
anatofuz
parents:
diff changeset
587 def: J<"plugin-opt=thinlto-index-only=">,
anatofuz
parents:
diff changeset
588 Alias<thinlto_index_only_eq>,
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
589 HelpText<"Alias for --thinlto-index-only=">;
150
anatofuz
parents:
diff changeset
590 def: J<"plugin-opt=thinlto-object-suffix-replace=">,
anatofuz
parents:
diff changeset
591 Alias<thinlto_object_suffix_replace_eq>,
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
592 HelpText<"Alias for --thinlto-object-suffix-replace=">;
150
anatofuz
parents:
diff changeset
593 def: J<"plugin-opt=thinlto-prefix-replace=">,
anatofuz
parents:
diff changeset
594 Alias<thinlto_prefix_replace_eq>,
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
595 HelpText<"Alias for --thinlto-prefix-replace=">;
150
anatofuz
parents:
diff changeset
596
anatofuz
parents:
diff changeset
597 // Ignore LTO plugin-related options.
anatofuz
parents:
diff changeset
598 // clang -flto passes -plugin and -plugin-opt to the linker. This is required
anatofuz
parents:
diff changeset
599 // for ld.gold and ld.bfd to get LTO working. But it's not for lld which doesn't
anatofuz
parents:
diff changeset
600 // rely on a plugin. Instead of detecting which linker is used on clang side we
anatofuz
parents:
diff changeset
601 // just ignore the option on lld side as it's easier. In fact, the linker could
anatofuz
parents:
diff changeset
602 // be called 'ld' and understanding which linker is used would require parsing of
anatofuz
parents:
diff changeset
603 // --version output.
anatofuz
parents:
diff changeset
604 defm plugin: Eq<"plugin", "Ignored for compatibility with GNU linkers">;
anatofuz
parents:
diff changeset
605
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
606 def plugin_opt_eq_minus: J<"plugin-opt=-">,
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
607 HelpText<"Specify an LLVM option for compatibility with LLVMgold.so">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
608 def: J<"plugin-opt=thinlto">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
609
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
610 // Ignore GCC collect2 LTO plugin related options. Note that we don't support
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
611 // GCC LTO, but GCC collect2 passes these options even in non-LTO mode.
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
612 def: J<"plugin-opt=-fresolution=">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
613 def: J<"plugin-opt=-pass-through=">;
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
614 // This may be either an unhandled LLVMgold.so feature or GCC passed
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
615 // -plugin-opt=path/to/{liblto_plugin.so,lto-wrapper}
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
616 def plugin_opt_eq : J<"plugin-opt=">;
150
anatofuz
parents:
diff changeset
617
anatofuz
parents:
diff changeset
618 // Options listed below are silently ignored for now for compatibility.
anatofuz
parents:
diff changeset
619 def: F<"detect-odr-violations">;
anatofuz
parents:
diff changeset
620 def: Flag<["-"], "g">;
anatofuz
parents:
diff changeset
621 def: F<"long-plt">;
anatofuz
parents:
diff changeset
622 def: F<"no-add-needed">;
anatofuz
parents:
diff changeset
623 def: F<"no-copy-dt-needed-entries">;
anatofuz
parents:
diff changeset
624 def: F<"no-ctors-in-init-array">;
anatofuz
parents:
diff changeset
625 def: F<"no-keep-memory">;
anatofuz
parents:
diff changeset
626 def: F<"no-pipeline-knowledge">;
anatofuz
parents:
diff changeset
627 def: F<"no-warn-mismatch">;
anatofuz
parents:
diff changeset
628 def: Flag<["-"], "p">;
anatofuz
parents:
diff changeset
629 def: Separate<["--", "-"], "rpath-link">;
anatofuz
parents:
diff changeset
630 def: J<"rpath-link=">;
anatofuz
parents:
diff changeset
631 def: F<"secure-plt">;
anatofuz
parents:
diff changeset
632 def: F<"sort-common">;
anatofuz
parents:
diff changeset
633 def: F<"stats">;
anatofuz
parents:
diff changeset
634 def: F<"warn-execstack">;
anatofuz
parents:
diff changeset
635 def: F<"warn-once">;
anatofuz
parents:
diff changeset
636 def: F<"warn-shared-textrel">;
anatofuz
parents:
diff changeset
637 def: F<"EB">;
anatofuz
parents:
diff changeset
638 def: F<"EL">;
anatofuz
parents:
diff changeset
639 def: JoinedOrSeparate<["-"], "G">;
anatofuz
parents:
diff changeset
640 def: F<"Qy">;
anatofuz
parents:
diff changeset
641
anatofuz
parents:
diff changeset
642 // Hidden option used for testing MIPS multi-GOT implementation.
anatofuz
parents:
diff changeset
643 defm mips_got_size:
anatofuz
parents:
diff changeset
644 Eq<"mips-got-size", "Max size of a single MIPS GOT. 0x10000 by default.">,
anatofuz
parents:
diff changeset
645 Flags<[HelpHidden]>;