]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lld/ELF/Options.td
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lld / ELF / Options.td
1 include "llvm/Option/OptParser.td"
2
3 // For options whose names are multiple letters, either one dash or
4 // two can precede the option name except those that start with 'o'.
5 class F<string name>: Flag<["--", "-"], name>;
6 class J<string name>: Joined<["--", "-"], name>;
7
8 multiclass Eq<string name, string help> {
9   def NAME: Separate<["--", "-"], name>;
10   def NAME # _eq: Joined<["--", "-"], name # "=">, Alias<!cast<Separate>(NAME)>,
11     HelpText<help>;
12 }
13
14 multiclass B<string name, string help1, string help2> {
15   def NAME: Flag<["--", "-"], name>, HelpText<help1>;
16   def no_ # NAME: Flag<["--", "-"], "no-" # name>, HelpText<help2>;
17 }
18
19 defm auxiliary: Eq<"auxiliary", "Set DT_AUXILIARY field to the specified name">;
20
21 def Bsymbolic: F<"Bsymbolic">, HelpText<"Bind defined symbols locally">;
22
23 def Bsymbolic_functions: F<"Bsymbolic-functions">,
24   HelpText<"Bind defined function symbols locally">;
25
26 def Bdynamic: F<"Bdynamic">, HelpText<"Link against shared libraries (default)">;
27
28 def Bstatic: F<"Bstatic">, HelpText<"Do not link against shared libraries">;
29
30 def build_id: F<"build-id">, HelpText<"Alias for --build-id=fast">;
31
32 def build_id_eq: J<"build-id=">, HelpText<"Generate build ID note">,
33   MetaVarName<"[fast,md5,sha1,uuid,0x<hexstring>]">;
34
35 defm check_sections: B<"check-sections",
36     "Check section addresses for overlaps (default)",
37     "Do not check section addresses for overlaps">;
38
39 defm compress_debug_sections:
40   Eq<"compress-debug-sections", "Compress DWARF debug sections">,
41   MetaVarName<"[none,zlib]">;
42
43 defm defsym: Eq<"defsym", "Define a symbol alias">, MetaVarName<"<symbol>=<value>">;
44
45 defm split_stack_adjust_size
46     : Eq<"split-stack-adjust-size",
47          "Specify adjustment to stack size when a split-stack function calls a "
48          "non-split-stack function">,
49       MetaVarName<"<value>">;
50
51 defm library_path:
52   Eq<"library-path", "Add a directory to the library search path">, MetaVarName<"<dir>">;
53
54 def O: JoinedOrSeparate<["-"], "O">, HelpText<"Optimize output file size">;
55
56 defm Tbss: Eq<"Tbss", "Same as --section-start with .bss as the sectionname">;
57
58 defm Tdata: Eq<"Tdata", "Same as --section-start with .data as the sectionname">;
59
60 defm Ttext: Eq<"Ttext", "Same as --section-start with .text as the sectionname">;
61
62 defm allow_multiple_definition: B<"allow-multiple-definition",
63     "Allow multiple definitions",
64     "Do not allow multiple definitions (default)">;
65
66 defm allow_shlib_undefined: B<"allow-shlib-undefined",
67     "Allow unresolved references in shared libraries (default when linking a shared library)",
68     "Do not allow unresolved references in shared libraries (default when linking an executable)">;
69
70 defm apply_dynamic_relocs: B<"apply-dynamic-relocs",
71     "Apply link-time values for dynamic relocations",
72     "Do not apply link-time values for dynamic relocations (default)">;
73
74 defm as_needed: B<"as-needed",
75     "Only set DT_NEEDED for shared libraries if used",
76     "Always set DT_NEEDED for shared libraries (default)">;
77
78 defm call_graph_ordering_file:
79   Eq<"call-graph-ordering-file", "Layout sections to optimize the given callgraph">;
80
81 defm call_graph_profile_sort: B<"call-graph-profile-sort",
82     "Reorder sections with call graph profile (default)",
83     "Do not reorder sections with call graph profile">;
84
85 // -chroot doesn't have a help text because it is an internal option.
86 def chroot: Separate<["--", "-"], "chroot">;
87
88 def color_diagnostics: F<"color-diagnostics">,
89   HelpText<"Alias for --color-diagnostics=always">;
90
91 def color_diagnostics_eq: J<"color-diagnostics=">,
92   HelpText<"Use colors in diagnostics">,
93   MetaVarName<"[auto,always,never]">;
94
95 defm cref: B<"cref",
96     "Output cross reference table",
97     "Do not output cross reference table">;
98
99 defm define_common: B<"define-common",
100     "Assign space to common symbols",
101     "Do not assign space to common symbols">;
102
103 defm demangle: B<"demangle",
104     "Demangle symbol names (default)",
105     "Do not demangle symbol names">;
106
107 def disable_new_dtags: F<"disable-new-dtags">,
108   HelpText<"Disable new dynamic tags">;
109
110 def discard_all: F<"discard-all">, HelpText<"Delete all local symbols">;
111
112 def discard_locals: F<"discard-locals">,
113   HelpText<"Delete temporary local symbols">;
114
115 def discard_none: F<"discard-none">,
116   HelpText<"Keep all symbols in the symbol table">;
117
118 defm dynamic_linker: Eq<"dynamic-linker", "Which dynamic linker to use">;
119
120 defm dynamic_list: Eq<"dynamic-list", "Read a list of dynamic symbols">;
121
122 defm eh_frame_hdr: B<"eh-frame-hdr",
123     "Request creation of .eh_frame_hdr section and PT_GNU_EH_FRAME segment header",
124     "Do not create .eh_frame_hdr section">;
125
126 def emit_relocs: F<"emit-relocs">, HelpText<"Generate relocations in output">;
127
128 def enable_new_dtags: F<"enable-new-dtags">,
129   HelpText<"Enable new dynamic tags (default)">;
130
131 def end_group: F<"end-group">,
132   HelpText<"Ignored for compatibility with GNU unless you pass --warn-backrefs">;
133
134 def end_lib: F<"end-lib">,
135   HelpText<"End a grouping of objects that should be treated as if they were together in an archive">;
136
137 defm entry: Eq<"entry", "Name of entry point symbol">,
138   MetaVarName<"<entry>">;
139
140 defm error_limit:
141   Eq<"error-limit", "Maximum number of errors to emit before stopping (0 = no limit)">;
142
143 def error_unresolved_symbols: F<"error-unresolved-symbols">,
144   HelpText<"Report unresolved symbols as errors">;
145
146 defm exclude_libs: Eq<"exclude-libs", "Exclude static libraries from automatic export">;
147
148 defm execute_only: B<"execute-only",
149     "Mark executable sections unreadable",
150     "Mark executable sections readable (default)">;
151
152 defm export_dynamic: B<"export-dynamic",
153     "Put symbols in the dynamic symbol table",
154     "Do not put symbols in the dynamic symbol table (default)">;
155
156 defm export_dynamic_symbol:
157   Eq<"export-dynamic-symbol", "Put a symbol in the dynamic symbol table">;
158
159 defm fatal_warnings: B<"fatal-warnings",
160     "Treat warnings as errors",
161     "Do not treat warnings as errors (default)">;
162
163 defm filter: Eq<"filter", "Set DT_FILTER field to the specified name">;
164
165 defm fini: Eq<"fini", "Specify a finalizer function">, MetaVarName<"<symbol>">;
166
167 def fix_cortex_a53_843419: F<"fix-cortex-a53-843419">,
168   HelpText<"Apply fixes for AArch64 Cortex-A53 erratum 843419">;
169
170 defm format: Eq<"format", "Change the input format of the inputs following this option">,
171   MetaVarName<"[default,elf,binary]">;
172
173 defm gc_sections: B<"gc-sections",
174     "Enable garbage collection of unused sections",
175     "Disable garbage collection of unused sections (default)">;
176
177 defm gdb_index: B<"gdb-index",
178     "Generate .gdb_index section",
179     "Do not generate .gdb_index section (default)">;
180
181 defm gnu_unique: B<"gnu-unique",
182   "Enable STB_GNU_UNIQUE symbol binding (default)",
183   "Disable STB_GNU_UNIQUE symbol binding">;
184
185 defm hash_style: Eq<"hash-style", "Specify hash style (sysv, gnu or both)">;
186
187 def help: F<"help">, HelpText<"Print option help">;
188
189 def icf_all: F<"icf=all">, HelpText<"Enable identical code folding">;
190
191 def icf_safe: F<"icf=safe">, HelpText<"Enable safe identical code folding">;
192
193 def icf_none: F<"icf=none">, HelpText<"Disable identical code folding (default)">;
194
195 def ignore_function_address_equality: F<"ignore-function-address-equality">,
196   HelpText<"lld can break the address equality of functions">;
197
198 def ignore_data_address_equality: F<"ignore-data-address-equality">,
199   HelpText<"lld can break the address equality of data">;
200
201 defm image_base: Eq<"image-base", "Set the base address">;
202
203 defm init: Eq<"init", "Specify an initializer function">,
204   MetaVarName<"<symbol>">;
205
206 defm just_symbols: Eq<"just-symbols", "Just link symbols">;
207
208 defm keep_unique: Eq<"keep-unique", "Do not fold this symbol during ICF">;
209
210 defm library: Eq<"library", "Root name of library to use">,
211   MetaVarName<"<libName>">;
212
213 def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">;
214
215 defm Map: Eq<"Map", "Print a link map to the specified file">;
216
217 defm merge_exidx_entries: B<"merge-exidx-entries",
218     "Enable merging .ARM.exidx entries (default)",
219     "Disable merging .ARM.exidx entries">;
220
221 def nostdlib: F<"nostdlib">,
222   HelpText<"Only search directories specified on the command line">;
223
224 def no_color_diagnostics: F<"no-color-diagnostics">,
225   HelpText<"Do not use colors in diagnostics">;
226
227 def no_dynamic_linker: F<"no-dynamic-linker">,
228   HelpText<"Inhibit output of .interp section">;
229
230 def noinhibit_exec: F<"noinhibit-exec">,
231   HelpText<"Retain the executable output file whenever it is still usable">;
232
233 def no_omagic: F<"no-omagic">, MetaVarName<"<magic>">,
234   HelpText<"Do not set the text data sections to be writable">;
235
236 def no_rosegment: F<"no-rosegment">,
237   HelpText<"Do not put read-only non-executable sections in their own segment">;
238
239 def no_undefined: F<"no-undefined">,
240   HelpText<"Report unresolved symbols even if the linker is creating a shared library">;
241
242 def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">,
243   HelpText<"Path to file to write output">;
244
245 def oformat: Separate<["--"], "oformat">, MetaVarName<"<format>">,
246   HelpText<"Specify the binary format for the output object file">;
247
248 def omagic: Flag<["--"], "omagic">, MetaVarName<"<magic>">,
249   HelpText<"Set the text and data sections to be readable and writable">;
250
251 defm orphan_handling:
252   Eq<"orphan-handling", "Control how orphan sections are handled when linker script used">;
253
254 defm pack_dyn_relocs:
255   Eq<"pack-dyn-relocs", "Pack dynamic relocations in the given format">,
256   MetaVarName<"[none,android,relr,android+relr]">;
257
258 defm use_android_relr_tags: B<"use-android-relr-tags",
259     "Use SHT_ANDROID_RELR / DT_ANDROID_RELR* tags instead of SHT_RELR / DT_RELR*",
260     "Use SHT_RELR / DT_RELR* tags (default)">;
261
262 def pic_veneer: F<"pic-veneer">,
263   HelpText<"Always generate position independent thunks (veneers)">;
264
265 defm pie: B<"pie",
266     "Create a position independent executable",
267     "Do not create a position independent executable (default)">;
268
269 defm print_gc_sections: B<"print-gc-sections",
270     "List removed unused sections",
271     "Do not list removed unused sections (default)">;
272
273 defm print_icf_sections: B<"print-icf-sections",
274     "List identical folded sections",
275     "Do not list identical folded sections (default)">;
276
277 def pop_state: F<"pop-state">,
278   HelpText<"Undo the effect of -push-state">;
279
280 def push_state: F<"push-state">,
281   HelpText<"Save the current state of -as-needed, -static and -whole-archive">;
282
283 def print_map: F<"print-map">,
284   HelpText<"Print a link map to the standard output">;
285
286 defm reproduce: Eq<"reproduce", "Dump linker invocation and input files for debugging">;
287
288 defm rpath: Eq<"rpath", "Add a DT_RUNPATH to the output">;
289
290 def relocatable: F<"relocatable">, HelpText<"Create relocatable object file">;
291
292 defm retain_symbols_file:
293   Eq<"retain-symbols-file", "Retain only the symbols listed in the file">,
294   MetaVarName<"<file>">;
295
296 defm script: Eq<"script", "Read linker script">;
297
298 defm section_start: Eq<"section-start", "Set address of section">,
299   MetaVarName<"<address>">;
300
301 def shared: F<"shared">, HelpText<"Build a shared object">;
302
303 defm soname: Eq<"soname", "Set DT_SONAME">;
304
305 defm sort_section:
306   Eq<"sort-section", "Specifies sections sorting rule when linkerscript is used">;
307
308 def start_group: F<"start-group">,
309   HelpText<"Ignored for compatibility with GNU unless you pass --warn-backrefs">;
310
311 def start_lib: F<"start-lib">,
312   HelpText<"Start a grouping of objects that should be treated as if they were together in an archive">;
313
314 def strip_all: F<"strip-all">, HelpText<"Strip all symbols">;
315
316 def strip_debug: F<"strip-debug">, HelpText<"Strip debugging information">;
317
318 defm symbol_ordering_file:
319   Eq<"symbol-ordering-file", "Layout sections to place symbols in the order specified by symbol ordering file">;
320
321 defm sysroot: Eq<"sysroot", "Set the system root">;
322
323 def target1_rel: F<"target1-rel">, HelpText<"Interpret R_ARM_TARGET1 as R_ARM_REL32">;
324
325 def target1_abs: F<"target1-abs">, HelpText<"Interpret R_ARM_TARGET1 as R_ARM_ABS32 (default)">;
326
327 defm target2:
328   Eq<"target2", "Interpret R_ARM_TARGET2 as <type>, where <type> is one of rel, abs, or got-rel">,
329   MetaVarName<"<type>">;
330
331 defm threads: B<"threads",
332     "Run the linker multi-threaded (default)",
333     "Do not run the linker multi-threaded">;
334
335 defm toc_optimize : B<"toc-optimize",
336     "(PowerPC64) Enable TOC related optimizations (default)",
337     "(PowerPC64) Disable TOC related optimizations">;
338
339 def trace: F<"trace">, HelpText<"Print the names of the input files">;
340
341 defm trace_symbol: Eq<"trace-symbol", "Trace references to symbols">;
342
343 defm undefined: Eq<"undefined", "Force undefined symbol during linking">,
344   MetaVarName<"<symbol>">;
345
346 defm unresolved_symbols:
347   Eq<"unresolved-symbols", "Determine how to handle unresolved symbols">;
348
349 defm undefined_version: B<"undefined-version",
350   "Allow unused version in version script (default)",
351   "Report version scripts that refer undefined symbols">;
352
353 defm rsp_quoting: Eq<"rsp-quoting", "Quoting style for response files">,
354   MetaVarName<"[posix,windows]">;
355
356 def v: Flag<["-"], "v">, HelpText<"Display the version number">;
357
358 def verbose: F<"verbose">, HelpText<"Verbose mode">;
359
360 def version: F<"version">, HelpText<"Display the version number and exit">;
361
362 defm version_script: Eq<"version-script", "Read a version script">;
363
364 defm warn_backrefs: B<"warn-backrefs",
365     "Warn about backward symbol references to fetch archive members",
366     "Do not warn about backward symbol references to fetch archive members (default)">;
367
368 defm warn_common: B<"warn-common",
369     "Warn about duplicate common symbols",
370     "Do not warn about duplicate common symbols (default)">;
371
372 defm warn_ifunc_textrel: B<"warn-ifunc-textrel",
373     "Warn about using ifunc symbols with text relocations",
374     "Do not warn about using ifunc symbols with text relocations (default)">;
375
376 defm warn_symbol_ordering: B<"warn-symbol-ordering",
377     "Warn about problems with the symbol ordering file (default)",
378     "Do not warn about problems with the symbol ordering file">;
379
380 def warn_unresolved_symbols: F<"warn-unresolved-symbols">,
381   HelpText<"Report unresolved symbols as warnings">;
382
383 defm whole_archive: B<"whole-archive",
384     "Force load of all members in a static library",
385     "Do not force load of all members in a static library (default)">;
386
387 defm wrap: Eq<"wrap", "Use wrapper functions for symbol">,
388   MetaVarName<"<symbol>=<symbol>">;
389
390 def z: JoinedOrSeparate<["-"], "z">, MetaVarName<"<option>">,
391   HelpText<"Linker option extensions">;
392
393 // Aliases
394 def: Separate<["-"], "f">, Alias<auxiliary>, HelpText<"Alias for --auxiliary">;
395 def: F<"call_shared">, Alias<Bdynamic>, HelpText<"Alias for --Bdynamic">;
396 def: F<"dy">, Alias<Bdynamic>, HelpText<"Alias for --Bdynamic">;
397 def: F<"dn">, Alias<Bstatic>, HelpText<"Alias for --Bstatic">;
398 def: F<"non_shared">, Alias<Bstatic>, HelpText<"Alias for --Bstatic">;
399 def: F<"static">, Alias<Bstatic>, HelpText<"Alias for --Bstatic">;
400 def: Flag<["-"], "d">, Alias<define_common>, HelpText<"Alias for --define-common">;
401 def: F<"dc">, Alias<define_common>, HelpText<"Alias for --define-common">;
402 def: F<"dp">, Alias<define_common>, HelpText<"Alias for --define-common">;
403 def: Flag<["-"], "x">, Alias<discard_all>, HelpText<"Alias for --discard-all">;
404 def: Flag<["-"], "X">, Alias<discard_locals>, HelpText<"Alias for --discard-locals">;
405 def: Flag<["-"], "q">, Alias<emit_relocs>, HelpText<"Alias for --emit-relocs">;
406 def: Flag<["-"], ")">, Alias<end_group>, HelpText<"Alias for --end-group">;
407 def: JoinedOrSeparate<["-"], "e">, Alias<entry>, HelpText<"Alias for --entry">;
408 def: Flag<["-"], "E">, Alias<export_dynamic>, HelpText<"Alias for --export-dynamic">;
409 def: Separate<["-"], "F">, Alias<filter>, HelpText<"Alias for --filter">;
410 def: Separate<["-"], "b">, Alias<format>, HelpText<"Alias for --format">;
411 def: JoinedOrSeparate<["-"], "l">, Alias<library>, HelpText<"Alias for --library">;
412 def: JoinedOrSeparate<["-"], "L">, Alias<library_path>, HelpText<"Alias for --library-path">;
413 def: F<"no-pic-executable">, Alias<no_pie>, HelpText<"Alias for --no-pie">;
414 def: Flag<["-"], "N">, Alias<omagic>, HelpText<"Alias for --omagic">;
415 def: Joined<["--"], "output=">, Alias<o>, HelpText<"Alias for -o">;
416 def: Separate<["--"], "output">, Alias<o>, HelpText<"Alias for -o">;
417 def: F<"pic-executable">, Alias<pie>, HelpText<"Alias for --pie">;
418 def: Flag<["-"], "M">, Alias<print_map>, HelpText<"Alias for --print-map">;
419 def: Flag<["-"], "r">, Alias<relocatable>, HelpText<"Alias for --relocatable">;
420 def: JoinedOrSeparate<["-"], "R">, Alias<rpath>, HelpText<"Alias for --rpath">;
421 def: JoinedOrSeparate<["-"], "T">, Alias<script>, HelpText<"Alias for --script">;
422 def: F<"Bshareable">, Alias<shared>, HelpText<"Alias for --shared">;
423 def: JoinedOrSeparate<["-"], "h">, Alias<soname>, HelpText<"Alias for --soname">;
424 def: Flag<["-"], "(">, Alias<start_group>, HelpText<"Alias for --start-group">;
425 def: Flag<["-"], "s">, Alias<strip_all>, HelpText<"Alias for --strip-all">;
426 def: Flag<["-"], "S">, Alias<strip_debug>, HelpText<"Alias for --strip-debug">;
427 def: Flag<["-"], "t">, Alias<trace>, HelpText<"Alias for --trace">;
428 def: JoinedOrSeparate<["-"], "y">, Alias<trace_symbol>, HelpText<"Alias for --trace-symbol">;
429 def: Separate<["-", "--"], "Ttext-segment">, Alias<Ttext>, HelpText<"Alias for --Ttext">;
430 def: Joined<["-", "--"], "Ttext-segment=">, Alias<Ttext>, HelpText<"Alias for --Ttext">;
431 def: JoinedOrSeparate<["-"], "u">, Alias<undefined>, HelpText<"Alias for --undefined">;
432 def: Flag<["-"], "V">, Alias<version>, HelpText<"Alias for --version">;
433
434 // LTO-related options.
435 def lto_aa_pipeline: J<"lto-aa-pipeline=">,
436   HelpText<"AA pipeline to run during LTO. Used in conjunction with -lto-newpm-passes">;
437 def lto_debug_pass_manager: F<"lto-debug-pass-manager">,
438   HelpText<"Debug new pass manager">;
439 def lto_new_pass_manager: F<"lto-new-pass-manager">,
440   HelpText<"Use new pass manager">;
441 def lto_newpm_passes: J<"lto-newpm-passes=">,
442   HelpText<"Passes to run during LTO">;
443 def lto_O: J<"lto-O">, MetaVarName<"<opt-level>">,
444   HelpText<"Optimization level for LTO">;
445 def lto_partitions: J<"lto-partitions=">,
446   HelpText<"Number of LTO codegen partitions">;
447 def lto_sample_profile: J<"lto-sample-profile=">,
448   HelpText<"Sample profile file path">;
449 def disable_verify: F<"disable-verify">;
450 defm mllvm: Eq<"mllvm", "Additional arguments to forward to LLVM's option processing">;
451 def opt_remarks_filename: Separate<["--"], "opt-remarks-filename">,
452   HelpText<"YAML output file for optimization remarks">;
453 def opt_remarks_with_hotness: Flag<["--"], "opt-remarks-with-hotness">,
454   HelpText<"Include hotness information in the optimization remarks file">;
455 defm plugin_opt: Eq<"plugin-opt", "specifies LTO options for compatibility with GNU linkers">;
456 def save_temps: F<"save-temps">;
457 def thinlto_cache_dir: J<"thinlto-cache-dir=">,
458   HelpText<"Path to ThinLTO cached object file directory">;
459 defm thinlto_cache_policy: Eq<"thinlto-cache-policy", "Pruning policy for the ThinLTO cache">;
460 def thinlto_jobs: J<"thinlto-jobs=">, HelpText<"Number of ThinLTO jobs">;
461
462 def: J<"plugin-opt=O">, Alias<lto_O>, HelpText<"Alias for -lto-O">;
463 def: F<"plugin-opt=debug-pass-manager">,
464   Alias<lto_debug_pass_manager>, HelpText<"Alias for -lto-debug-pass-manager">;
465 def: F<"plugin-opt=disable-verify">, Alias<disable_verify>, HelpText<"Alias for -disable-verify">;
466 def plugin_opt_dwo_dir_eq: J<"plugin-opt=dwo_dir=">,
467   HelpText<"Directory to store .dwo files when LTO and debug fission are used">;
468 def plugin_opt_emit_llvm: F<"plugin-opt=emit-llvm">;
469 def: J<"plugin-opt=jobs=">, Alias<thinlto_jobs>, HelpText<"Alias for -thinlto-jobs">;
470 def: J<"plugin-opt=lto-partitions=">, Alias<lto_partitions>, HelpText<"Alias for -lto-partitions">;
471 def plugin_opt_mcpu_eq: J<"plugin-opt=mcpu=">;
472 def: F<"plugin-opt=new-pass-manager">,
473   Alias<lto_new_pass_manager>, HelpText<"Alias for -lto-new-pass-manager">;
474 def plugin_opt_obj_path_eq: J<"plugin-opt=obj-path=">;
475 def: J<"plugin-opt=sample-profile=">,
476   Alias<lto_sample_profile>, HelpText<"Alias for -lto-sample-profile">;
477 def: F<"plugin-opt=save-temps">, Alias<save_temps>, HelpText<"Alias for -save-temps">;
478 def plugin_opt_thinlto_emit_imports_files: F<"plugin-opt=thinlto-emit-imports-files">;
479 def plugin_opt_thinlto_index_only: F<"plugin-opt=thinlto-index-only">;
480 def plugin_opt_thinlto_index_only_eq: J<"plugin-opt=thinlto-index-only=">;
481 def plugin_opt_thinlto_object_suffix_replace_eq: J<"plugin-opt=thinlto-object-suffix-replace=">;
482 def plugin_opt_thinlto_prefix_replace_eq: J<"plugin-opt=thinlto-prefix-replace=">;
483
484 // Ignore LTO plugin-related options.
485 // clang -flto passes -plugin and -plugin-opt to the linker. This is required
486 // for ld.gold and ld.bfd to get LTO working. But it's not for lld which doesn't
487 // rely on a plugin. Instead of detecting which linker is used on clang side we
488 // just ignore the option on lld side as it's easier. In fact, the linker could
489 // be called 'ld' and understanding which linker is used would require parsing of
490 // --version output.
491 defm plugin: Eq<"plugin", "Ignored for compatibility with GNU linkers">;
492
493 def plugin_opt_fresolution_eq: J<"plugin-opt=-fresolution=">;
494 def plugin_opt_pass_through_eq: J<"plugin-opt=-pass-through=">;
495 def plugin_opt_thinlto: J<"plugin-opt=thinlto">;
496 def plugin_opt_slash: J<"plugin-opt=/">;
497
498 // Options listed below are silently ignored for now for compatibility.
499 def: F<"detect-odr-violations">;
500 def: Flag<["-"], "g">;
501 def: F<"long-plt">;
502 def: F<"no-add-needed">;
503 def: F<"no-copy-dt-needed-entries">;
504 def: F<"no-ctors-in-init-array">;
505 def: F<"no-keep-memory">;
506 def: F<"no-mmap-output-file">;
507 def: F<"no-warn-mismatch">;
508 def: Separate<["--", "-"], "rpath-link">;
509 def: J<"rpath-link=">;
510 def: F<"sort-common">;
511 def: F<"stats">;
512 def: F<"warn-execstack">;
513 def: F<"warn-once">;
514 def: F<"warn-shared-textrel">;
515 def: F<"EB">;
516 def: F<"EL">;
517 def: JoinedOrSeparate<["-"], "G">;
518 def: F<"Qy">;
519
520 // Hidden option used for testing MIPS multi-GOT implementation.
521 defm mips_got_size:
522   Eq<"mips-got-size", "Max size of a single MIPS GOT. 0x10000 by default.">,
523   Flags<[HelpHidden]>;