1 include "llvm/Option/OptParser.td"
3 // Flags that lld/MachO understands but ld64 doesn't. These take
4 // '--' instead of '-' and use dashes instead of underscores, so
5 // they don't collide with the ld64 compat options.
6 def grp_lld : OptionGroup<"kind">, HelpText<"LLD-SPECIFIC">;
8 def help : Flag<["-", "--"], "help">,
10 def help_hidden : Flag<["--"], "help-hidden">,
11 HelpText<"Display help for hidden options">,
13 def verbose : Flag<["--"], "verbose">,
15 def error_limit_eq : Joined<["--"], "error-limit=">,
16 HelpText<"Maximum number of errors to print before exiting (default: 20)">,
18 def color_diagnostics: Flag<["--"], "color-diagnostics">,
19 HelpText<"Alias for --color-diagnostics=always">,
21 def no_color_diagnostics: Flag<["--"], "no-color-diagnostics">,
22 HelpText<"Alias for --color-diagnostics=never">,
24 def color_diagnostics_eq: Joined<["--"], "color-diagnostics=">,
25 HelpText<"Use colors in diagnostics (default: auto)">,
26 MetaVarName<"[auto,always,never]">,
28 def threads_eq : Joined<["--"], "threads=">,
29 HelpText<"Number of threads. '1' disables multi-threading. By default all available hardware threads are used">,
31 def thinlto_jobs_eq : Joined<["--"], "thinlto-jobs=">,
32 HelpText<"Number of ThinLTO jobs. Default to --threads=">,
34 def reproduce: Separate<["--"], "reproduce">,
36 def reproduce_eq: Joined<["--"], "reproduce=">,
37 Alias<!cast<Separate>(reproduce)>,
38 HelpText<"Write tar file containing inputs and command to reproduce link">,
40 def version: Flag<["--"], "version">,
41 HelpText<"Display the version number and exit">,
43 def no_lto_legacy_pass_manager : Flag<["--"], "no-lto-legacy-pass-manager">,
44 HelpText<"Use the new pass manager in LLVM">,
46 def time_trace_eq: Joined<["--"], "time-trace=">,
47 HelpText<"Record time trace to <file>">,
48 MetaVarName<"<file>">,
50 def : Flag<["--"], "time-trace">,
52 HelpText<"Record time trace to file next to output">,
54 def time_trace_granularity_eq: Joined<["--"], "time-trace-granularity=">,
55 HelpText<"Minimum time granularity (in microseconds) traced by time profiler">,
57 def deduplicate_literals: Flag<["--"], "deduplicate-literals">,
58 HelpText<"Enable literal deduplication. This is implied by --icf={safe,all}">,
60 def print_dylib_search: Flag<["--"], "print-dylib-search">,
61 HelpText<"Print which paths lld searched when trying to find dylibs">,
63 def icf_eq: Joined<["--"], "icf=">,
64 HelpText<"Set level for identical code folding (default: none)">,
65 MetaVarName<"[none,safe,all]">,
67 def lto_O: Joined<["--"], "lto-O">,
68 HelpText<"Set optimization level for LTO (default: 2)">,
69 MetaVarName<"<opt-level>">,
71 def thinlto_cache_policy: Joined<["--"], "thinlto-cache-policy=">,
72 HelpText<"Pruning policy for the ThinLTO cache">,
74 def O : JoinedOrSeparate<["-"], "O">,
75 HelpText<"Optimize output file size">;
76 def start_lib: Flag<["--"], "start-lib">,
77 HelpText<"Start a grouping of objects that should be treated as if they were together in an archive">;
78 def end_lib: Flag<["--"], "end-lib">,
79 HelpText<"End a grouping of objects that should be treated as if they were together in an archive">;
80 def no_warn_dylib_install_name: Joined<["--"], "no-warn-dylib-install-name">,
81 HelpText<"Do not warn on -install-name if -dylib is not passed (default)">,
83 def warn_dylib_install_name: Joined<["--"], "warn-dylib-install-name">,
84 HelpText<"Warn on -install-name if -dylib is not passed">,
86 def call_graph_profile_sort: Flag<["--"], "call-graph-profile-sort">,
87 HelpText<"Reorder sections with call graph profile (default)">,
89 def no_call_graph_profile_sort : Flag<["--"], "no-call-graph-profile-sort">,
90 HelpText<"Do not reorder sections with call graph profile">,
92 def print_symbol_order: Joined<["--"], "print-symbol-order=">,
93 HelpText<"Print a symbol order specified by --call-graph-profile-sort into the specified file">,
96 // This is a complete Options.td compiled from Apple's ld(1) manpage
97 // dated 2018-03-07 and cross checked with ld64 source code in repo
98 // https://github.com/apple-opensource/ld64 at git tag "512.4" dated
101 // Flags<[HelpHidden]> marks options that are not yet ported to lld,
102 // and serve as a scoreboard for annotating our progress toward
103 // implementing ld64 options in lld. As you add implementions to
104 // Driver.cpp, please remove the hidden flag here.
106 def grp_kind : OptionGroup<"kind">, HelpText<"OUTPUT KIND">;
108 def execute : Flag<["-"], "execute">,
109 HelpText<"Produce a main executable (default)">,
111 def dylib : Flag<["-"], "dylib">,
112 HelpText<"Produce a shared library">,
114 def bundle : Flag<["-"], "bundle">,
115 HelpText<"Produce a bundle">,
117 def r : Flag<["-"], "r">,
118 HelpText<"Merge multiple object files into one, retaining relocations">,
121 def dylinker : Flag<["-"], "dylinker">,
122 HelpText<"Produce a dylinker only used when building dyld">,
125 def dynamic : Flag<["-"], "dynamic">,
126 HelpText<"Link dynamically (default)">,
128 def static : Flag<["-"], "static">,
129 HelpText<"Link statically">,
132 def preload : Flag<["-"], "preload">,
133 HelpText<"Produce an unsegmented binary for embedded systems">,
136 def arch : Separate<["-"], "arch">,
137 MetaVarName<"<arch_name>">,
138 HelpText<"The architecture (e.g. ppc, ppc64, i386, x86_64)">,
140 def o : Separate<["-"], "o">,
141 MetaVarName<"<path>">,
142 HelpText<"The name of the output file (default: `a.out')">,
145 def grp_libs : OptionGroup<"libs">, HelpText<"LIBRARIES">;
147 def l : Joined<["-"], "l">,
148 MetaVarName<"<name>">,
149 HelpText<"Search for lib<name>.dylib or lib<name>.a on the library search path">,
151 def weak_l : Joined<["-"], "weak-l">,
152 MetaVarName<"<name>">,
153 HelpText<"Like -l<name>, but mark library and its references as weak imports">,
155 def weak_library : Separate<["-"], "weak_library">,
156 MetaVarName<"<path>">,
157 HelpText<"Like bare <path>, but mark library and its references as weak imports">,
159 def needed_l : Joined<["-"], "needed-l">,
160 MetaVarName<"<name>">,
161 HelpText<"Like -l<name>, but link library even if its symbols are not used and -dead_strip_dylibs is active">,
163 def needed_library : Separate<["-"], "needed_library">,
164 MetaVarName<"<path>">,
165 HelpText<"Like bare <path>, but link library even if its symbols are not used and -dead_strip_dylibs is active">,
167 def reexport_l : Joined<["-"], "reexport-l">,
168 MetaVarName<"<name>">,
169 HelpText<"Like -l<name>, but export all symbols of <name> from newly created library">,
171 def reexport_library : Separate<["-"], "reexport_library">,
172 MetaVarName<"<path>">,
173 HelpText<"Like bare <path>, but export all symbols of <path> from newly created library">,
175 def upward_l : Joined<["-"], "upward-l">,
176 MetaVarName<"<name>">,
177 HelpText<"Like -l<name>, but specify dylib as an upward dependency">,
180 def upward_library : Separate<["-"], "upward_library">,
181 MetaVarName<"<path>">,
182 HelpText<"Like bare <path>, but specify dylib as an upward dependency">,
185 def L : JoinedOrSeparate<["-"], "L">,
186 MetaVarName<"<dir>">,
187 HelpText<"Add dir to the library search path">,
189 def Z : Flag<["-"], "Z">,
190 HelpText<"Remove standard directories from the library and framework search paths">,
192 def syslibroot : Separate<["-"], "syslibroot">,
193 MetaVarName<"<rootdir>">,
194 HelpText<"Prepend <rootdir> to all library and framework search paths">,
196 def search_paths_first : Flag<["-"], "search_paths_first">,
197 HelpText<"Search for lib<name>.dylib and lib<name>.a at each step in traversing search path (default for Xcode 4 and later)">,
199 def search_dylibs_first : Flag<["-"], "search_dylibs_first">,
200 HelpText<"Search for lib<name>.dylib on first pass, then for lib<name>.a on second pass through search path (default for Xcode 3 and earlier)">,
202 def framework : Separate<["-"], "framework">,
203 MetaVarName<"<name>">,
204 HelpText<"Search for <name>.framework/<name> on the framework search path">,
206 def weak_framework : Separate<["-"], "weak_framework">,
207 MetaVarName<"<name>">,
208 HelpText<"Like -framework <name>, but mark framework and its references as weak imports">,
210 def needed_framework : Separate<["-"], "needed_framework">,
211 MetaVarName<"<name>">,
212 HelpText<"Like -framework <name>, but link <name> even if none of its symbols are used and -dead_strip_dylibs is active">,
214 def reexport_framework : Separate<["-"], "reexport_framework">,
215 MetaVarName<"<name>">,
216 HelpText<"Like -framework <name>, but export all symbols of <name> from the newly created library">,
218 def upward_framework : Separate<["-"], "upward_framework">,
219 MetaVarName<"<name>">,
220 HelpText<"Like -framework <name>, but specify the framework as an upward dependency">,
223 def F : JoinedOrSeparate<["-"], "F">,
224 MetaVarName<"<dir>">,
225 HelpText<"Add dir to the framework search path">,
227 def all_load : Flag<["-"], "all_load">,
228 HelpText<"Load all members of all static archive libraries">,
230 def noall_load : Flag<["-"], "noall_load">,
231 HelpText<"Don't load all static members from archives, this is the default, this negates -all_load">,
233 def ObjC : Flag<["-"], "ObjC">,
234 HelpText<"Load all members of static archives that are an Objective-C class or category.">,
236 def force_load : Separate<["-"], "force_load">,
237 MetaVarName<"<path>">,
238 HelpText<"Load all members static archive library at <path>">,
240 def force_load_swift_libs : Flag<["-"], "force_load_swift_libs">,
241 HelpText<"Apply -force_load to libraries listed in LC_LINKER_OPTIONS whose names start with 'swift'">,
243 def load_hidden : Separate<["-"], "load_hidden">,
244 MetaVarName<"<path>">,
245 HelpText<"Load all symbols from static library with hidden visibility">,
247 def hidden_l : Joined<["-"], "hidden-l">,
248 MetaVarName<"<name>">,
249 HelpText<"Like -l<name>, but load all symbols with hidden visibility">,
252 def grp_content : OptionGroup<"content">, HelpText<"ADDITIONAL CONTENT">;
254 def sectcreate : MultiArg<["-"], "sectcreate", 3>,
255 MetaVarName<"<segment> <section> <file>">,
256 HelpText<"Create <section> in <segment> from the contents of <file>">,
258 def segcreate : MultiArg<["-"], "segcreate", 3>,
259 MetaVarName<"<segment> <section> <file>">,
261 HelpText<"Alias for -sectcreate">,
263 def add_empty_section : MultiArg<["-"], "add_empty_section", 2>,
264 MetaVarName<"<segment> <section>">,
265 HelpText<"Create an empty <section> in <segment>">,
267 def filelist : Separate<["-"], "filelist">,
268 MetaVarName<"<file>">,
269 HelpText<"Read names of files to link from <file>">,
271 def dtrace : Separate<["-"], "dtrace">,
272 MetaVarName<"<script>">,
273 HelpText<"Enable DTrace static probes according to declarations in <script>">,
277 def grp_opts : OptionGroup<"opts">, HelpText<"OPTIMIZATIONS">;
279 def dead_strip : Flag<["-"], "dead_strip">,
280 HelpText<"Remove unreachable functions and data">,
282 def order_file : Separate<["-"], "order_file">,
283 MetaVarName<"<file>">,
284 HelpText<"Layout functions and data according to specification in <file>">,
286 def no_order_inits : Flag<["-"], "no_order_inits">,
287 HelpText<"Disable default reordering of initializer and terminator functions">,
290 def no_order_data : Flag<["-"], "no_order_data">,
291 HelpText<"Disable default reordering of global data accessed at launch time">,
294 def image_base : Separate<["-"], "image_base">,
295 MetaVarName<"<address>">,
296 HelpText<"Preferred hex load address for a dylib or bundle.">,
299 def seg1addr : Separate<["-"], "seg1addr">,
300 MetaVarName<"<address>">,
302 HelpText<"Alias for -image_base">,
305 def no_implicit_dylibs : Flag<["-"], "no_implicit_dylibs">,
306 HelpText<"Do not optimize public dylib transitive symbol references">,
308 def exported_symbols_order : Separate<["-"], "exported_symbols_order">,
309 MetaVarName<"<file>">,
310 HelpText<"Specify frequently-used symbols in <file> to optimize symbol exports">,
313 def no_zero_fill_sections : Flag<["-"], "no_zero_fill_sections">,
314 HelpText<"Explicitly store zeroed data in the final image">,
317 def merge_zero_fill_sections : Flag<["-"], "merge_zero_fill_sections">,
318 HelpText<"Merge all zeroed data into the __zerofill section">,
321 def no_branch_islands : Flag<["-"], "no_branch_islands">,
322 HelpText<"Disable infra for branches beyond the maximum branch distance.">,
325 def no_deduplicate : Flag<["-"], "no_deduplicate">,
326 HelpText<"Disable code deduplication (synonym for `--icf=none')">,
327 Alias<icf_eq>, AliasArgs<["none"]>,
330 def grp_version : OptionGroup<"version">, HelpText<"VERSION TARGETING">;
332 def platform_version : MultiArg<["-"], "platform_version", 3>,
333 MetaVarName<"<platform> <min_version> <sdk_version>">,
334 HelpText<"Platform (e.g., macos, ios, tvos, watchos, bridgeos, mac-catalyst, ios-sim, tvos-sim, watchos-sim, driverkit) and version numbers">,
336 def sdk_version : Separate<["-"], "sdk_version">,
337 HelpText<"This option is undocumented in ld64">,
340 def macos_version_min : Separate<["-"], "macos_version_min">,
341 MetaVarName<"<version>">,
342 HelpText<"Oldest macOS version for which linked output is usable">,
344 def macosx_version_min : Separate<["-"], "macosx_version_min">,
345 MetaVarName<"<version>">,
346 Alias<macos_version_min>,
347 HelpText<"Alias for -macos_version_min">,
350 def ios_version_min : Separate<["-"], "ios_version_min">,
351 MetaVarName<"<version>">,
352 HelpText<"Oldest iOS version for which linked output is usable">,
355 def ios_simulator_version_min : Separate<["-"], "ios_simulator_version_min">,
356 MetaVarName<"<version>">,
357 HelpText<"Oldest iOS simulator version for which linked output is usable">,
360 def iphoneos_version_min : Separate<["-"], "iphoneos_version_min">,
361 MetaVarName<"<version>">,
362 Alias<ios_version_min>,
363 HelpText<"Alias for -ios_version_min">,
366 def maccatalyst_version_min : Separate<["-"], "maccatalyst_version_min">,
367 MetaVarName<"<version>">,
368 HelpText<"Oldest MacCatalyst version for which linked output is usable">,
371 def iosmac_version_min : Separate<["-"], "iosmac_version_min">,
372 MetaVarName<"<version>">,
373 Alias<maccatalyst_version_min>,
374 HelpText<"Alias for -maccatalyst_version_min">,
377 def uikitformac_version_min : Separate<["-"], "uikitformac_version_min">,
378 MetaVarName<"<version>">,
379 Alias<maccatalyst_version_min>,
380 HelpText<"Alias for -maccatalyst_version_min">,
383 def tvos_version_min : Separate<["-"], "tvos_version_min">,
384 MetaVarName<"<version>">,
385 HelpText<"Oldest tvOS version for which linked output is usable">,
388 def watchos_version_min : Separate<["-"], "watchos_version_min">,
389 MetaVarName<"<version>">,
390 HelpText<"Oldest watchOS version for which linked output is usable">,
393 def bridgeos_version_min : Separate<["-"], "bridgeos_version_min">,
394 MetaVarName<"<version>">,
395 HelpText<"Oldest bridgeOS version for which linked output is usable">,
398 def driverkit_version_min : Separate<["-"], "driverkit_version_min">,
399 MetaVarName<"<version>">,
400 HelpText<"Oldest DriverKit version for which linked output is usable">,
404 def grp_dylib : OptionGroup<"dylib">, HelpText<"DYNAMIC LIBRARIES (DYLIB)">;
406 def install_name : Separate<["-"], "install_name">,
407 MetaVarName<"<name>">,
408 HelpText<"Set an internal install path in a dylib">,
410 def dylib_install_name : Separate<["-"], "dylib_install_name">,
411 MetaVarName<"<name>">,
413 HelpText<"Alias for -install_name">,
415 def dylinker_install_name : Separate<["-"], "dylinker_install_name">,
416 MetaVarName<"<name>">,
418 HelpText<"Alias for -install_name">,
420 def mark_dead_strippable_dylib : Flag<["-"], "mark_dead_strippable_dylib">,
421 HelpText<"Mark output dylib as dead-strippable: When a client links against it but does not use any of its symbols, the dylib will not be added to the client's list of needed dylibs">,
423 def compatibility_version : Separate<["-"], "compatibility_version">,
424 MetaVarName<"<version>">,
425 HelpText<"Compatibility <version> of this library">,
427 def dylib_compatibility_version : Separate<["-"], "dylib_compatibility_version">,
428 MetaVarName<"<version>">,
429 Alias<compatibility_version>,
430 HelpText<"Alias for -compatibility_version">,
433 def current_version : Separate<["-"], "current_version">,
434 MetaVarName<"<version>">,
435 HelpText<"Current <version> of this library">,
437 def dylib_current_version : Separate<["-"], "dylib_current_version">,
438 MetaVarName<"<version>">,
439 Alias<current_version>,
440 HelpText<"Alias for -current_version">,
444 def grp_main : OptionGroup<"main">, HelpText<"MAIN EXECUTABLE">;
446 def pie : Flag<["-"], "pie">,
447 HelpText<"Build a position independent executable (default)">,
449 def no_pie : Flag<["-"], "no_pie">,
450 HelpText<"Do not build a position independent executable">,
452 def pagezero_size : Separate<["-"], "pagezero_size">,
453 MetaVarName<"<size>">,
454 HelpText<"Size of unreadable segment at address zero is hex <size> (default is 4KB on 32-bit and 4GB on 64-bit)">,
456 def stack_size : Separate<["-"], "stack_size">,
457 MetaVarName<"<size>">,
458 HelpText<"Maximum hex stack size for the main thread in a program. (default is 8MB)">,
461 def allow_stack_execute : Flag<["-"], "allow_stack_execute">,
462 HelpText<"Mark stack segment as executable">,
465 def export_dynamic : Flag<["-"], "export_dynamic">,
466 HelpText<"Preserve all global symbols during LTO and when dead-stripping executables">,
469 def grp_bundle : OptionGroup<"bundle">, HelpText<"CREATING A BUNDLE">;
471 def bundle_loader : Separate<["-"], "bundle_loader">,
472 MetaVarName<"<executable>">,
473 HelpText<"Resolve undefined symbols from <executable>">,
476 def grp_object : OptionGroup<"object">, HelpText<"CREATING AN OBJECT FILE">;
478 def keep_private_externs : Flag<["-"], "keep_private_externs">,
479 HelpText<"Do not convert private external symbols to static symbols (only valid with -r)">,
482 def d : Flag<["-"], "d">,
483 HelpText<"Force tentative into real definitions for common symbols">,
487 def grp_resolve : OptionGroup<"resolve">, HelpText<"SYMBOL RESOLUTION">;
489 def exported_symbol : Separate<["-"], "exported_symbol">,
490 MetaVarName<"<symbol>">,
491 HelpText<"<symbol> remains global, while others become private externs">,
493 def exported_symbols_list : Separate<["-"], "exported_symbols_list">,
494 MetaVarName<"<file>">,
495 HelpText<"Symbols specified in <file> remain global, while others become private externs">,
497 def no_exported_symbols : Flag<["-"], "no_exported_symbols">,
498 HelpText<"Don't export any symbols from the binary, useful for main executables that don't have plugins">,
500 def unexported_symbol : Separate<["-"], "unexported_symbol">,
501 MetaVarName<"<symbol>">,
502 HelpText<"Global <symbol> becomes private extern">,
504 def unexported_symbols_list : Separate<["-"], "unexported_symbols_list">,
505 MetaVarName<"<file>">,
506 HelpText<"Global symbols specified in <file> become private externs">,
508 def reexported_symbols_list : Separate<["-"], "reexported_symbols_list">,
509 MetaVarName<"<file>">,
510 HelpText<"Symbols from dependent dylibs specified in <file> are reexported by this dylib">,
513 def alias : MultiArg<["-"], "alias", 2>,
514 MetaVarName<"<symbol_name> <alternate_name>">,
515 HelpText<"Create a symbol alias with default global visibility">,
517 def alias_list : Separate<["-"], "alias_list">,
518 MetaVarName<"<file>">,
519 HelpText<"Create symbol aliases specified in <file>">,
522 def flat_namespace : Flag<["-"], "flat_namespace">,
523 HelpText<"Resolve symbols from all dylibs, both direct and transitive. Do not record source libraries: dyld must re-search at runtime and use the first definition found">,
525 def twolevel_namespace : Flag<["-"], "twolevel_namespace">,
526 HelpText<"Make dyld look up symbols by (dylib,name) pairs (default)">,
528 def u : Separate<["-"], "u">,
529 MetaVarName<"<symbol>">,
530 HelpText<"Require that <symbol> be defined for the link to succeed">,
532 def U : Separate<["-"], "U">,
533 MetaVarName<"<symbol>">,
534 HelpText<"Allow <symbol> to have no definition">,
536 def undefined : Separate<["-"], "undefined">,
537 MetaVarName<"<treatment>">,
538 HelpText<"Handle undefined symbols according to <treatment>: error, warning, suppress, or dynamic_lookup (default is error)">,
540 def rpath : Separate<["-"], "rpath">,
541 MetaVarName<"<path>">,
542 HelpText<"Add <path> to dyld search list for dylibs with load path prefix `@rpath/'">,
544 def commons : Separate<["-"], "commons">,
545 MetaVarName<"<treatment>">,
546 HelpText<"Resolve tentative definitions in dylibs according to <treatment>: ignore_dylibs, use_dylibs, error (default is ignore_dylibs)">,
550 def grp_introspect : OptionGroup<"introspect">, HelpText<"INTROSPECTING THE LINKER">;
552 def why_load : Flag<["-"], "why_load">,
553 HelpText<"Log why each object file is loaded from a static library">,
554 Group<grp_introspect>;
555 def whyload : Flag<["-"], "whyload">,
557 HelpText<"Alias for -why_load">,
558 Group<grp_introspect>;
559 def why_live : Separate<["-"], "why_live">,
560 MetaVarName<"<symbol>">,
561 HelpText<"Log a chain of references to <symbol>, for use with -dead_strip">,
562 Group<grp_introspect>;
563 def print_statistics : Flag<["-"], "print_statistics">,
564 HelpText<"Log the linker's memory and CPU usage">,
566 Group<grp_introspect>;
567 def t : Flag<["-"], "t">,
568 HelpText<"Log every file the linker loads: object, archive, and dylib">,
569 Group<grp_introspect>;
570 def whatsloaded : Flag<["-"], "whatsloaded">,
571 HelpText<"Logs only the object files the linker loads">,
573 Group<grp_introspect>;
574 def order_file_statistics : Flag<["-"], "order_file_statistics">,
575 HelpText<"Logs information about -order_file">,
577 Group<grp_introspect>;
578 def map : Separate<["-"], "map">,
579 MetaVarName<"<path>">,
580 HelpText<"Writes all symbols and their addresses to <path>">,
581 Group<grp_introspect>;
582 def dependency_info : Separate<["-"], "dependency_info">,
583 MetaVarName<"<path>">,
584 HelpText<"Dump dependency info">,
585 Group<grp_introspect>;
586 def save_temps : Flag<["-"], "save-temps">,
587 HelpText<"Save intermediate LTO compilation results">,
588 Group<grp_introspect>;
590 def grp_symtab : OptionGroup<"symtab">, HelpText<"SYMBOL TABLE">;
592 def S : Flag<["-"], "S">,
593 HelpText<"Strip debug information (STABS or DWARF) from the output">,
595 def x : Flag<["-"], "x">,
596 HelpText<"Exclude non-global symbols from the output symbol table">,
598 def non_global_symbols_strip_list : Separate<["-"], "non_global_symbols_strip_list">,
599 MetaVarName<"<path>">,
600 HelpText<"Specify in <path> the non-global symbols that should be removed from the output symbol table">,
602 def non_global_symbols_no_strip_list : Separate<["-"], "non_global_symbols_no_strip_list">,
603 MetaVarName<"<path>">,
604 HelpText<"Specify in <path> the non-global symbols that should remain in the output symbol table">,
606 def oso_prefix : Separate<["-"], "oso_prefix">,
607 MetaVarName<"<path>">,
608 HelpText<"Remove the prefix <path> from OSO symbols in the debug map">,
610 def add_ast_path : Separate<["-"], "add_ast_path">,
611 MetaVarName<"<path>">,
612 HelpText<"AST paths will be emitted as STABS">,
615 def grp_bitcode : OptionGroup<"bitcode">, HelpText<"BITCODE BUILD FLOW">;
617 def bitcode_bundle : Flag<["-"], "bitcode_bundle">,
618 HelpText<"Generate an embedded bitcode bundle in the __LLVM,__bundle section of the output">,
620 def bitcode_hide_symbols : Flag<["-"], "bitcode_hide_symbols">,
621 HelpText<"With -bitcode_bundle, hide all non-exported symbols from output bitcode bundle.">,
624 def bitcode_symbol_map : Separate<["-"], "bitcode_symbol_map">,
625 MetaVarName<"<path>">,
626 HelpText<"Write the bitcode symbol reverse mapping to file <path>, or if a directory, to <path>/UUID.bcsymbolmap">,
630 def grp_rare : OptionGroup<"rare">, HelpText<"RARELY USED">;
632 def v : Flag<["-"], "v">,
633 HelpText<"Print the linker version and search paths in addition to linking">,
635 def adhoc_codesign : Flag<["-"], "adhoc_codesign">,
636 HelpText<"Write an ad-hoc code signature to the output file (default for arm64 binaries)">,
638 def no_adhoc_codesign : Flag<["-"], "no_adhoc_codesign">,
639 HelpText<"Do not write an ad-hoc code signature to the output file (default for x86_64 binaries)">,
641 def version_details : Flag<["-"], "version_details">,
642 HelpText<"Print the linker version in JSON form">,
645 def no_weak_imports : Flag<["-"], "no_weak_imports">,
646 HelpText<"Fail if any symbols are weak imports, allowed to be NULL at runtime">,
649 def verbose_deduplicate : Flag<["-"], "verbose_deduplicate">,
650 HelpText<"Print function names eliminated by deduplication and the total size of code savings">,
653 def no_inits : Flag<["-"], "no_inits">,
654 HelpText<"Fail if the output contains static initializers">,
657 def no_warn_inits : Flag<["-"], "no_warn_inits">,
658 HelpText<"Suppress warnings for static initializers in the output">,
661 def debug_variant : Flag<["-"], "debug_variant">,
662 HelpText<"Suppress warnings germane to binaries shipping to customers">,
665 def unaligned_pointers : Separate<["-"], "unaligned_pointers">,
666 MetaVarName<"<treatment>">,
667 HelpText<"Handle unaligned pointers in __DATA segments according to <treatment>: warning, error, or suppress (default for arm64e is error, otherwise suppress)">,
670 def dirty_data_list : Separate<["-"], "dirty_data_list">,
671 MetaVarName<"<path>">,
672 HelpText<"Specify data symbols in <path> destined for the __DATA_DIRTY segment">,
675 def max_default_common_align : Separate<["-"], "max_default_common_align">,
676 MetaVarName<"<boundary>">,
677 HelpText<"Reduce maximum alignment for common symbols to a hex power-of-2 <boundary>">,
680 def move_to_rw_segment : MultiArg<["-"], "move_to_rw_segment", 2>,
681 MetaVarName<"<segment> <path>">,
682 HelpText<"Move data symbols listed in <path> to another <segment>">,
685 def move_to_ro_segment : MultiArg<["-"], "move_to_ro_segment", 2>,
686 MetaVarName<"<segment> <path>">,
687 HelpText<"Move code symbols listed in <path> to another <segment>">,
690 def rename_section : MultiArg<["-"], "rename_section", 4>,
691 MetaVarName<"<from_segment> <from_section> <to_segment> <to_section>">,
692 HelpText<"Rename <from_segment>/<from_section> as <to_segment>/<to_section>">,
694 def rename_segment : MultiArg<["-"], "rename_segment", 2>,
695 MetaVarName<"<from_segment> <to_segment>">,
696 HelpText<"Rename <from_segment> as <to_segment>">,
698 def trace_symbol_layout : Flag<["-"], "trace_symbol_layout">,
699 HelpText<"Show where and why symbols move, as specified by -move_to_ro_segment, -move_to_rw_segment, -rename_section, and -rename_segment">,
702 def data_const : Flag<["-"], "data_const">,
703 HelpText<"Force migration of readonly data into __DATA_CONST segment">,
705 def no_data_const : Flag<["-"], "no_data_const">,
706 HelpText<"Block migration of readonly data away from __DATA segment">,
708 def text_exec : Flag<["-"], "text_exec">,
709 HelpText<"Rename __segment TEXT to __TEXT_EXEC for sections __text and __stubs">,
712 def section_order : MultiArg<["-"], "section_order", 2>,
713 MetaVarName<"<segment> <sections>">,
714 HelpText<"With -preload, specify layout sequence of colon-separated <sections> in <segment>">,
717 def segment_order : Separate<["-"], "segment_order">,
718 MetaVarName<"<colon_separated_segment_list>">,
719 HelpText<"With -preload, specify layout sequence of colon-separated <segments>">,
722 def allow_heap_execute : Flag<["-"], "allow_heap_execute">,
723 HelpText<"On i386, allow any page to execute code">,
726 def application_extension : Flag<["-"], "application_extension">,
727 HelpText<"Mark output as safe for use in an application extension, and validate that linked dylibs are safe">,
729 def no_application_extension : Flag<["-"], "no_application_extension">,
730 HelpText<"Disable application extension functionality (default)">,
732 def fatal_warnings : Flag<["-"], "fatal_warnings">,
733 HelpText<"Treat warnings as errors">,
735 def no_eh_labels : Flag<["-"], "no_eh_labels">,
736 HelpText<"In -r mode, suppress .eh labels in the __eh_frame section">,
739 def warn_compact_unwind : Flag<["-"], "warn_compact_unwind">,
740 HelpText<"Warn for each FDE that cannot compact into the __unwind_info section and must remain in the __eh_frame section">,
743 def warn_weak_exports : Flag<["-"], "warn_weak_exports">,
744 HelpText<"Warn if the linked image contains weak external symbols">,
747 def no_weak_exports : Flag<["-"], "no_weak_exports">,
748 HelpText<"Fail if the linked image contains weak external symbols">,
751 def objc_gc_compaction : Flag<["-"], "objc_gc_compaction">,
752 HelpText<"Mark the Objective-C image as compatible with compacting garbage collection">,
755 def objc_gc : Flag<["-"], "objc_gc">,
756 HelpText<"Verify that all code was compiled with -fobjc-gc or -fobjc-gc-only">,
759 def objc_gc_only : Flag<["-"], "objc_gc_only">,
760 HelpText<"Verify that all code was compiled with -fobjc-gc-only">,
763 def dead_strip_dylibs : Flag<["-"], "dead_strip_dylibs">,
764 HelpText<"Remove dylibs that are unreachable by the entry point or exported symbols">,
766 def allow_sub_type_mismatches : Flag<["-"], "allow_sub_type_mismatches">,
767 HelpText<"Permit mixing objects compiled for different ARM CPU subtypes">,
770 def no_uuid : Flag<["-"], "no_uuid">,
771 HelpText<"Do not generate the LC_UUID load command">,
774 def root_safe : Flag<["-"], "root_safe">,
775 HelpText<"Set the MH_ROOT_SAFE bit in the mach-o header">,
778 def setuid_safe : Flag<["-"], "setuid_safe">,
779 HelpText<"Set the MH_SETUID_SAFE bit in the mach-o header">,
782 def interposable : Flag<["-"], "interposable">,
783 HelpText<"Indirects access to all to exported symbols in a dylib">,
786 def multi_module : Flag<["-"], "multi_module">,
788 HelpText<"Alias for -interposable">,
791 def init : Separate<["-"], "init">,
792 MetaVarName<"<symbol>">,
793 HelpText<"Run <symbol> as the first initializer in a dylib">,
796 def sub_library : Separate<["-"], "sub_library">,
797 MetaVarName<"<name>">,
798 HelpText<"Re-export the dylib as <name>">,
800 def sub_umbrella : Separate<["-"], "sub_umbrella">,
801 MetaVarName<"<name>">,
802 HelpText<"Re-export the framework as <name>">,
804 def allowable_client : Separate<["-"], "allowable_client">,
805 MetaVarName<"<name>">,
806 HelpText<"Specify <name> of a dylib or framework that is allowed to link to this dylib">,
809 def client_name : Separate<["-"], "client_name">,
810 MetaVarName<"<name>">,
811 HelpText<"Specifies a <name> this client should match with the -allowable_client <name> in a dependent dylib">,
814 def umbrella : Separate<["-"], "umbrella">,
815 MetaVarName<"<name>">,
816 HelpText<"Re-export this dylib through the umbrella framework <name>">,
818 def headerpad : Separate<["-"], "headerpad">,
819 MetaVarName<"<size>">,
820 HelpText<"Allocate hex <size> extra space for future expansion of the load commands via install_name_tool (default is 0x20)">,
822 def headerpad_max_install_names : Flag<["-"], "headerpad_max_install_names">,
823 HelpText<"Allocate extra space so all load-command paths can expand to MAXPATHLEN via install_name_tool">,
825 def bind_at_load : Flag<["-"], "bind_at_load">,
826 HelpText<"Tell dyld to bind all symbols at load time, rather than lazily">,
829 def force_flat_namespace : Flag<["-"], "force_flat_namespace">,
830 HelpText<"Tell dyld to use a flat namespace on this executable and all its dependent dylibs & bundles">,
833 def segalign : Separate<["-"], "segalign">,
834 MetaVarName<"<boundary>">,
835 HelpText<"Align all segments to hex power-of-2 <boundary>">,
838 def sectalign : MultiArg<["-"], "sectalign", 3>,
839 MetaVarName<"<segment> <section> <boundary>">,
840 HelpText<"Align <section> within <segment> to hex power-of-2 <boundary>">,
842 def stack_addr : Separate<["-"], "stack_addr">,
843 MetaVarName<"<address>">,
844 HelpText<"Initialize stack pointer to hex <address> rounded to a page boundary">,
847 def segprot : MultiArg<["-"], "segprot", 3>,
848 MetaVarName<"<segment> <max> <init>">,
849 HelpText<"Specifies the <max> and <init> virtual memory protection of <segment> as r/w/x/-seg_addr_table path">,
851 def segs_read_write_addr : Separate<["-"], "segs_read_write_addr">,
852 MetaVarName<"<address>">,
853 HelpText<"This option is obsolete">,
856 def segs_read_only_addr : Separate<["-"], "segs_read_only_addr">,
857 MetaVarName<"<address>">,
858 HelpText<"This option is obsolete">,
861 def segaddr : MultiArg<["-"], "segaddr", 2>,
862 MetaVarName<"<segment> <address>">,
863 HelpText<"Specify the starting hex <address> at a 4KiB page boundary for <segment>">,
866 def seg_page_size : MultiArg<["-"], "seg_page_size", 2>,
867 MetaVarName<"<segment> <size>">,
868 HelpText<"Specifies the page <size> for <segment>. Segment size will be a multiple of its page size">,
871 def dylib_file : Separate<["-"], "dylib_file">,
872 MetaVarName<"<install_path:current_path>">,
873 HelpText<"Specify <current_path> as different from where a dylib normally resides at <install_path>">,
876 def weak_reference_mismatches : Separate<["-"], "weak_reference_mismatches">,
877 MetaVarName<"<treatment>">,
878 HelpText<"Resolve symbol imports of conflicting weakness according to <treatment> as weak, non-weak, or error (default is non-weak)">,
881 def read_only_relocs : Separate<["-"], "read_only_relocs">,
882 MetaVarName<"<treatment>">,
883 HelpText<"Handle relocations that modify read-only pages according to <treatment> of warning, error, or suppress (i.e., allow)">,
886 def force_cpusubtype_ALL : Flag<["-"], "force_cpusubtype_ALL">,
887 HelpText<"Mark binary as runnable on any PowerPC, ignoring any PowerPC cpu requirements encoded in the object files">,
890 def no_arch_warnings : Flag<["-"], "no_arch_warnings">,
891 HelpText<"Suppresses warnings about inputs whose architecture does not match the -arch option">,
894 def arch_errors_fatal : Flag<["-"], "arch_errors_fatal">,
895 HelpText<"Escalate to errors any warnings about inputs whose architecture does not match the -arch option">,
897 def e : Separate<["-"], "e">,
898 MetaVarName<"<symbol>">,
899 HelpText<"Make <symbol> the entry point of an executable (default is \"start\" from crt1.o)">,
901 def w : Flag<["-"], "w">,
902 HelpText<"Suppress all warnings">,
904 def final_output : Separate<["-"], "final_output">,
905 MetaVarName<"<name>">,
906 HelpText<"Specify dylib install name if -install_name is not used; used by compiler driver for multiple -arch arguments">,
908 def arch_multiple : Flag<["-"], "arch_multiple">,
909 HelpText<"Augment error and warning messages with the architecture name">,
911 def dot : Separate<["-"], "dot">,
912 MetaVarName<"<path>">,
913 HelpText<"Write a graph of symbol dependencies to <path> as a .dot file viewable with GraphViz">,
916 def keep_relocs : Flag<["-"], "keep_relocs">,
917 HelpText<"Retain section-based relocation records in the output, which are ignored at runtime by dyld">,
920 def warn_stabs : Flag<["-"], "warn_stabs">,
921 HelpText<"Warn when bad stab symbols inside a BINCL/EINCL prevent optimization">,
924 def warn_commons : Flag<["-"], "warn_commons">,
925 HelpText<"Warn when a tentative definition in an object file matches an external symbol in a dylib, which often means \"extern\" is missing from a variable declaration in a header file">,
928 def read_only_stubs : Flag<["-"], "read_only_stubs">,
929 HelpText<"On i386, make the __IMPORT segment of a final linked image read-only">,
932 def interposable_list : Separate<["-"], "interposable_list">,
933 MetaVarName<"<path>">,
934 HelpText<"Access global symbols listed in <path> indirectly">,
937 def no_function_starts : Flag<["-"], "no_function_starts">,
938 HelpText<"Do not create table of function start addresses">,
940 def no_objc_category_merging : Flag<["-"], "no_objc_category_merging">,
941 HelpText<"Do not merge Objective-C categories into their classes">,
944 def object_path_lto : Separate<["-"], "object_path_lto">,
945 MetaVarName<"<path>">,
946 HelpText<"Retain any temporary mach-o file in <path> that would otherwise be deleted during LTO">,
948 def cache_path_lto : Separate<["-"], "cache_path_lto">,
949 MetaVarName<"<path>">,
950 HelpText<"Use <path> as a directory for the incremental LTO cache">,
952 def prune_interval_lto : Separate<["-"], "prune_interval_lto">,
953 MetaVarName<"<seconds>">,
954 HelpText<"Prune the incremental LTO cache after <seconds> (-1 disables pruning)">,
956 def prune_after_lto : Separate<["-"], "prune_after_lto">,
957 MetaVarName<"<seconds>">,
958 HelpText<"Remove LTO cache entries after <seconds>">,
960 def max_relative_cache_size_lto : Separate<["-"], "max_relative_cache_size_lto">,
961 MetaVarName<"<percent>">,
962 HelpText<"Limit the incremental LTO cache growth to <percent> of free disk, space">,
964 def page_align_data_atoms : Flag<["-"], "page_align_data_atoms">,
965 HelpText<"Distribute global variables on separate pages so page used/dirty status can guide creation of an order file to cluster commonly used/dirty globals">,
968 def not_for_dyld_shared_cache : Flag<["-"], "not_for_dyld_shared_cache">,
969 HelpText<"Prevent system dylibs from being placed into the dylib shared cache">,
972 def mllvm : Separate<["-"], "mllvm">,
973 HelpText<"Options to pass to LLVM">,
975 def mcpu : Separate<["-"], "mcpu">,
976 HelpText<"Processor family target for LTO code generation">,
978 def no_dtrace_dof : Flag<["-"], "no_dtrace_dof">,
979 HelpText<"Disable dtrace-dof processing (default).">,
982 def grp_deprecated : OptionGroup<"deprecated">, HelpText<"DEPRECATED">;
984 def lazy_framework : Separate<["-"], "lazy_framework">,
985 MetaVarName<"<name>">,
986 HelpText<"This option is deprecated and is now an alias for -framework.">,
988 Group<grp_deprecated>;
989 def lazy_library : Separate<["-"], "lazy_library">,
990 MetaVarName<"<path>">,
991 HelpText<"This option is deprecated and is now an alias for regular linking">,
993 Group<grp_deprecated>;
994 def lazy_l : Joined<["-"], "lazy-l">,
995 MetaVarName<"<name>">,
996 HelpText<"This option is deprecated and is now an alias for -l<path>.">,
998 Group<grp_deprecated>;
999 def single_module : Flag<["-"], "single_module">,
1000 HelpText<"Unnecessary option: this is already the default">,
1001 Flags<[HelpHidden]>,
1002 Group<grp_deprecated>;
1003 def no_dead_strip_inits_and_terms : Flag<["-"], "no_dead_strip_inits_and_terms">,
1004 HelpText<"Unnecessary option: initialization and termination are roots of the dead strip graph, so never dead stripped">,
1005 Flags<[HelpHidden]>,
1006 Group<grp_deprecated>;
1008 def grp_obsolete : OptionGroup<"obsolete">, HelpText<"OBSOLETE">;
1010 def sectorder : MultiArg<["-"], "sectorder", 3>,
1011 MetaVarName<"<segname> <sectname> <orderfile>">,
1012 HelpText<"Obsolete. Replaced by more general -order_file option">,
1013 Group<grp_obsolete>;
1014 def lto_library : Separate<["-"], "lto_library">,
1015 MetaVarName<"<path>">,
1016 HelpText<"Obsolete. LLD supports LTO directly, without using an external dylib.">,
1017 Group<grp_obsolete>;
1018 def y : Joined<["-"], "y">,
1019 MetaVarName<"<symbol>">,
1020 HelpText<"This option is obsolete in ld64">,
1021 Flags<[HelpHidden]>,
1022 Group<grp_obsolete>;
1023 def sectobjectsymbols : MultiArg<["-"], "sectobjectsymbols", 2>,
1024 MetaVarName<"<segname> <sectname>">,
1025 HelpText<"This option is obsolete in ld64">,
1026 Flags<[HelpHidden]>,
1027 Group<grp_obsolete>;
1028 def nofixprebinding : Flag<["-"], "nofixprebinding">,
1029 HelpText<"This option is obsolete in ld64">,
1030 Flags<[HelpHidden]>,
1031 Group<grp_obsolete>;
1032 def noprebind_all_twolevel_modules : Flag<["-"], "noprebind_all_twolevel_modules">,
1033 HelpText<"This option is obsolete in ld64">,
1034 Flags<[HelpHidden]>,
1035 Group<grp_obsolete>;
1036 def prebind_all_twolevel_modules : Flag<["-"], "prebind_all_twolevel_modules">,
1037 HelpText<"This option is obsolete in ld64">,
1038 Flags<[HelpHidden]>,
1039 Group<grp_obsolete>;
1040 def prebind_allow_overlap : Flag<["-"], "prebind_allow_overlap">,
1041 HelpText<"This option is obsolete in ld64">,
1042 Flags<[HelpHidden]>,
1043 Group<grp_obsolete>;
1044 def noprebind : Flag<["-"], "noprebind">,
1045 HelpText<"This option is obsolete in ld64">,
1046 Flags<[HelpHidden]>,
1047 Group<grp_obsolete>;
1048 def sect_diff_relocs : Separate<["-"], "sect_diff_relocs">,
1049 MetaVarName<"<treatment>">,
1050 HelpText<"This option is obsolete in ld64">,
1051 Flags<[HelpHidden]>,
1052 Group<grp_obsolete>;
1053 def A : Separate<["-"], "A">,
1054 MetaVarName<"<basefile>">,
1055 HelpText<"This option is obsolete in ld64">,
1056 Flags<[HelpHidden]>,
1057 Group<grp_obsolete>;
1058 def b : Flag<["-"], "b">,
1059 HelpText<"This option is obsolete in ld64">,
1060 Flags<[HelpHidden]>,
1061 Group<grp_obsolete>;
1062 def Sn : Flag<["-"], "Sn">,
1063 HelpText<"This option is obsolete in ld64">,
1064 Flags<[HelpHidden]>,
1065 Group<grp_obsolete>;
1066 def Si : Flag<["-"], "Si">,
1067 HelpText<"This option is obsolete in ld64">,
1068 Flags<[HelpHidden]>,
1069 Group<grp_obsolete>;
1070 def Sp : Flag<["-"], "Sp">,
1071 HelpText<"This option is obsolete in ld64">,
1072 Flags<[HelpHidden]>,
1073 Group<grp_obsolete>;
1074 def X : Flag<["-"], "X">,
1075 HelpText<"This option is obsolete in ld64">,
1076 Flags<[HelpHidden]>,
1077 Group<grp_obsolete>;
1078 def s : Flag<["-"], "s">,
1079 HelpText<"This option is obsolete in ld64">,
1080 Flags<[HelpHidden]>,
1081 Group<grp_obsolete>;
1082 def m : Flag<["-"], "m">,
1083 HelpText<"This option is obsolete in ld64">,
1084 Flags<[HelpHidden]>,
1085 Group<grp_obsolete>;
1086 def Y : Separate<["-"], "Y">,
1087 MetaVarName<"<number>">,
1088 HelpText<"This option is obsolete in ld64">,
1089 Flags<[HelpHidden]>,
1090 Group<grp_obsolete>;
1091 def nomultidefs : Flag<["-"], "nomultidefs">,
1092 HelpText<"This option is obsolete in ld64">,
1093 Flags<[HelpHidden]>,
1094 Group<grp_obsolete>;
1095 def multiply_defined_unused : Separate<["-"], "multiply_defined_unused">,
1096 MetaVarName<"<treatment>">,
1097 HelpText<"This option is obsolete in ld64">,
1098 Flags<[HelpHidden]>,
1099 Group<grp_obsolete>;
1100 def multiply_defined : Separate<["-"], "multiply_defined">,
1101 MetaVarName<"<treatment>">,
1102 HelpText<"This option is obsolete in ld64">,
1103 Flags<[HelpHidden]>,
1104 Group<grp_obsolete>;
1105 def private_bundle : Flag<["-"], "private_bundle">,
1106 HelpText<"This option is obsolete in ld64">,
1107 Flags<[HelpHidden]>,
1108 Group<grp_obsolete>;
1109 def seg_addr_table_filename : Separate<["-"], "seg_addr_table_filename">,
1110 MetaVarName<"<path>">,
1111 HelpText<"This option is obsolete in ld64">,
1112 Flags<[HelpHidden]>,
1113 Group<grp_obsolete>;
1114 def sectorder_detail : Flag<["-"], "sectorder_detail">,
1115 HelpText<"This option is obsolete in ld64">,
1116 Flags<[HelpHidden]>,
1117 Group<grp_obsolete>;
1118 def no_compact_linkedit : Flag<["-"], "no_compact_linkedit">,
1119 HelpText<"This option is obsolete in ld64">,
1120 Flags<[HelpHidden]>,
1121 Group<grp_obsolete>;
1122 def dependent_dr_info : Flag<["-"], "dependent_dr_info">,
1123 HelpText<"This option is obsolete in ld64">,
1124 Flags<[HelpHidden]>,
1125 Group<grp_obsolete>;
1126 def no_dependent_dr_info : Flag<["-"], "no_dependent_dr_info">,
1127 HelpText<"This option is obsolete in ld64">,
1128 Flags<[HelpHidden]>,
1129 Group<grp_obsolete>;
1130 def seglinkedit : Flag<["-"], "seglinkedit">,
1131 HelpText<"This option is obsolete in ld64">,
1132 Flags<[HelpHidden]>,
1133 Group<grp_obsolete>;
1134 def noseglinkedit : Flag<["-"], "noseglinkedit">,
1135 HelpText<"This option is obsolete in ld64">,
1136 Flags<[HelpHidden]>,
1137 Group<grp_obsolete>;
1138 def fvmlib : Flag<["-"], "fvmlib">,
1139 HelpText<"This option is obsolete in ld64">,
1140 Flags<[HelpHidden]>,
1141 Group<grp_obsolete>;
1142 def run_init_lazily : Flag<["-"], "run_init_lazily">,
1143 HelpText<"This option is obsolete in ld64">,
1144 Flags<[HelpHidden]>,
1145 Group<grp_obsolete>;
1146 def prebind : Flag<["-"], "prebind">,
1147 HelpText<"This option is obsolete in ld64">,
1148 Flags<[HelpHidden]>,
1149 Group<grp_obsolete>;
1150 def twolevel_namespace_hints : Flag<["-"], "twolevel_namespace_hints">,
1151 HelpText<"This option is obsolete in ld64">,
1152 Flags<[HelpHidden]>,
1153 Group<grp_obsolete>;
1154 def slow_stubs : Flag<["-"], "slow_stubs">,
1155 HelpText<"This option is obsolete in ld64">,
1156 Flags<[HelpHidden]>,
1157 Group<grp_obsolete>;
1159 def grp_undocumented : OptionGroup<"undocumented">, HelpText<"UNDOCUMENTED">;
1161 def add_linker_option : Flag<["-"], "add_linker_option">,
1162 HelpText<"This option is undocumented in ld64">,
1163 Flags<[HelpHidden]>,
1164 Group<grp_undocumented>;
1165 def add_source_version : Flag<["-"], "add_source_version">,
1166 HelpText<"This option is undocumented in ld64">,
1167 Flags<[HelpHidden]>,
1168 Group<grp_undocumented>;
1169 def no_source_version : Flag<["-"], "no_source_version">,
1170 HelpText<"This option is undocumented in ld64">,
1171 Flags<[HelpHidden]>,
1172 Group<grp_undocumented>;
1173 def add_split_seg_info : Flag<["-"], "add_split_seg_info">,
1174 HelpText<"This option is undocumented in ld64">,
1175 Flags<[HelpHidden]>,
1176 Group<grp_undocumented>;
1177 def allow_dead_duplicates : Flag<["-"], "allow_dead_duplicates">,
1178 HelpText<"This option is undocumented in ld64">,
1179 Flags<[HelpHidden]>,
1180 Group<grp_undocumented>;
1181 def allow_simulator_linking_to_macosx_dylibs : Flag<["-"], "allow_simulator_linking_to_macosx_dylibs">,
1182 HelpText<"This option is undocumented in ld64">,
1183 Flags<[HelpHidden]>,
1184 Group<grp_undocumented>;
1185 def bitcode_process_mode : Separate<["-"], "bitcode_process_mode">,
1186 HelpText<"This option is undocumented in ld64">,
1187 Flags<[HelpHidden]>,
1188 Group<grp_undocumented>;
1189 def bitcode_verify : Flag<["-"], "bitcode_verify">,
1190 HelpText<"This option is undocumented in ld64">,
1191 Flags<[HelpHidden]>,
1192 Group<grp_undocumented>;
1193 def classic_linker : Flag<["-"], "classic_linker">,
1194 HelpText<"This option is undocumented in ld64">,
1195 Flags<[HelpHidden]>,
1196 Group<grp_undocumented>;
1197 def data_in_code_info : Flag<["-"], "data_in_code_info">,
1198 HelpText<"Emit data-in-code information (default)">,
1199 Group<grp_undocumented>;
1200 def no_data_in_code_info : Flag<["-"], "no_data_in_code_info">,
1201 HelpText<"Do not emit data-in-code information">,
1202 Group<grp_undocumented>;
1203 def debug_snapshot : Flag<["-"], "debug_snapshot">,
1204 HelpText<"This option is undocumented in ld64">,
1205 Flags<[HelpHidden]>,
1206 Group<grp_undocumented>;
1207 def demangle : Flag<["-"], "demangle">,
1208 HelpText<"Demangle symbol names in diagnostics">;
1209 def dyld_env : Flag<["-"], "dyld_env">,
1210 HelpText<"This option is undocumented in ld64">,
1211 Flags<[HelpHidden]>,
1212 Group<grp_undocumented>;
1213 def encryptable : Flag<["-"], "encryptable">,
1214 HelpText<"Generate the LC_ENCRYPTION_INFO load command">,
1215 Group<grp_undocumented>;
1216 def no_encryption : Flag<["-"], "no_encryption">,
1217 HelpText<"Do not generate the LC_ENCRYPTION_INFO load command">,
1218 Group<grp_undocumented>;
1219 def executable_path : Flag<["-"], "executable_path">,
1220 HelpText<"This option is undocumented in ld64">,
1221 Flags<[HelpHidden]>,
1222 Group<grp_undocumented>;
1223 def fixup_chains : Flag<["-"], "fixup_chains">,
1224 HelpText<"This option is undocumented in ld64">,
1225 Flags<[HelpHidden]>,
1226 Group<grp_undocumented>;
1227 def fixup_chains_section : Flag<["-"], "fixup_chains_section">,
1228 HelpText<"This option is undocumented in ld64">,
1229 Flags<[HelpHidden]>,
1230 Group<grp_undocumented>;
1231 def flto_codegen_only : Flag<["-"], "flto-codegen-only">,
1232 HelpText<"This option is undocumented in ld64">,
1233 Flags<[HelpHidden]>,
1234 Group<grp_undocumented>;
1235 def force_symbol_not_weak : Flag<["-"], "force_symbol_not_weak">,
1236 HelpText<"This option is undocumented in ld64">,
1237 Flags<[HelpHidden]>,
1238 Group<grp_undocumented>;
1239 def force_symbols_coalesce_list : Flag<["-"], "force_symbols_coalesce_list">,
1240 HelpText<"This option is undocumented in ld64">,
1241 Flags<[HelpHidden]>,
1242 Group<grp_undocumented>;
1243 def force_symbols_not_weak_list : Flag<["-"], "force_symbols_not_weak_list">,
1244 HelpText<"This option is undocumented in ld64">,
1245 Flags<[HelpHidden]>,
1246 Group<grp_undocumented>;
1247 def force_symbols_weak_list : Flag<["-"], "force_symbols_weak_list">,
1248 HelpText<"This option is undocumented in ld64">,
1249 Flags<[HelpHidden]>,
1250 Group<grp_undocumented>;
1251 def force_symbol_weak : Flag<["-"], "force_symbol_weak">,
1252 HelpText<"This option is undocumented in ld64">,
1253 Flags<[HelpHidden]>,
1254 Group<grp_undocumented>;
1255 def function_starts : Flag<["-"], "function_starts">,
1256 HelpText<"Create table of function start addresses (default)">,
1257 Group<grp_undocumented>;
1258 def i : Flag<["-"], "i">,
1259 HelpText<"This option is undocumented in ld64">,
1260 Flags<[HelpHidden]>,
1261 Group<grp_undocumented>;
1262 def ignore_auto_link : Flag<["-"], "ignore_auto_link">,
1263 HelpText<"This option is undocumented in ld64">,
1264 Flags<[HelpHidden]>,
1265 Group<grp_undocumented>;
1266 def ignore_optimization_hints : Flag<["-"], "ignore_optimization_hints">,
1267 HelpText<"Ignore Linker Optimization Hints">,
1268 Group<grp_undocumented>;
1269 def init_offsets : Flag<["-"], "init_offsets">,
1270 HelpText<"This option is undocumented in ld64">,
1271 Flags<[HelpHidden]>,
1272 Group<grp_undocumented>;
1273 def keep_dwarf_unwind : Flag<["-"], "keep_dwarf_unwind">,
1274 HelpText<"This option is undocumented in ld64">,
1275 Flags<[HelpHidden]>,
1276 Group<grp_undocumented>;
1277 def no_keep_dwarf_unwind : Flag<["-"], "no_keep_dwarf_unwind">,
1278 HelpText<"This option is undocumented in ld64">,
1279 Flags<[HelpHidden]>,
1280 Group<grp_undocumented>;
1281 def kext : Flag<["-"], "kext">,
1282 HelpText<"This option is undocumented in ld64">,
1283 Flags<[HelpHidden]>,
1284 Group<grp_undocumented>;
1285 def kext_objects_dir : Flag<["-"], "kext_objects_dir">,
1286 HelpText<"This option is undocumented in ld64">,
1287 Flags<[HelpHidden]>,
1288 Group<grp_undocumented>;
1289 def no_kext_objects : Flag<["-"], "no_kext_objects">,
1290 HelpText<"This option is undocumented in ld64">,
1291 Flags<[HelpHidden]>,
1292 Group<grp_undocumented>;
1293 def kexts_use_stubs : Flag<["-"], "kexts_use_stubs">,
1294 HelpText<"This option is undocumented in ld64">,
1295 Flags<[HelpHidden]>,
1296 Group<grp_undocumented>;
1297 def no_compact_unwind : Flag<["-"], "no_compact_unwind">,
1298 HelpText<"This option is undocumented in ld64">,
1299 Flags<[HelpHidden]>,
1300 Group<grp_undocumented>;
1301 def no_new_main : Flag<["-"], "no_new_main">,
1302 HelpText<"This option is undocumented in ld64">,
1303 Flags<[HelpHidden]>,
1304 Group<grp_undocumented>;
1305 def pause : Flag<["-"], "pause">,
1306 HelpText<"This option is undocumented in ld64">,
1307 Flags<[HelpHidden]>,
1308 Group<grp_undocumented>;
1309 def random_uuid : Flag<["-"], "random_uuid">,
1310 HelpText<"This option is undocumented in ld64">,
1311 Flags<[HelpHidden]>,
1312 Group<grp_undocumented>;
1313 def simulator_support : Flag<["-"], "simulator_support">,
1314 HelpText<"This option is undocumented in ld64">,
1315 Flags<[HelpHidden]>,
1316 Group<grp_undocumented>;
1317 def snapshot_dir : Flag<["-"], "snapshot_dir">,
1318 HelpText<"This option is undocumented in ld64">,
1319 Flags<[HelpHidden]>,
1320 Group<grp_undocumented>;
1321 def source_version : Flag<["-"], "source_version">,
1322 HelpText<"This option is undocumented in ld64">,
1323 Flags<[HelpHidden]>,
1324 Group<grp_undocumented>;
1325 def threaded_starts_section : Flag<["-"], "threaded_starts_section">,
1326 HelpText<"This option is undocumented in ld64">,
1327 Flags<[HelpHidden]>,
1328 Group<grp_undocumented>;
1329 def verbose_optimization_hints : Flag<["-"], "verbose_optimization_hints">,
1330 HelpText<"This option is undocumented in ld64">,
1331 Flags<[HelpHidden]>,
1332 Group<grp_undocumented>;
1333 def version_load_command : Flag<["-"], "version_load_command">,
1334 HelpText<"This option is undocumented in ld64">,
1335 Flags<[HelpHidden]>,
1336 Group<grp_undocumented>;
1338 def grp_ignored : OptionGroup<"ignored">, HelpText<"IGNORED">;
1340 def M : Flag<["-"], "M">,
1341 HelpText<"This option is ignored in ld64">,
1342 Flags<[HelpHidden]>,
1344 def new_linker : Flag<["-"], "new_linker">,
1345 HelpText<"This option is ignored in ld64">,
1346 Flags<[HelpHidden]>,
1349 def grp_ignored_silently : OptionGroup<"ignored_silently">, HelpText<"IGNORED SILENTLY">;
1351 def objc_abi_version : Separate<["-"], "objc_abi_version">,
1352 HelpText<"This option only applies to i386 in ld64">,
1353 Flags<[HelpHidden]>,
1354 Group<grp_ignored_silently>;