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