1 include "llvm/Option/OptParser.td"
3 multiclass BB<string name, string help1, string help2> {
4 def NAME: Flag<["--"], name>, HelpText<help1>;
5 def no_ # NAME: Flag<["--"], "no-" # name>, HelpText<help2>;
8 // Flags that lld/MachO understands but ld64 doesn't. These take
9 // '--' instead of '-' and use dashes instead of underscores, so
10 // they don't collide with the ld64 compat options.
11 def grp_lld : OptionGroup<"kind">, HelpText<"LLD-SPECIFIC">;
13 def help : Flag<["-", "--"], "help">,
15 def help_hidden : Flag<["--"], "help-hidden">,
16 HelpText<"Display help for hidden options">,
18 def verbose : Flag<["--"], "verbose">,
20 def error_limit_eq : Joined<["--"], "error-limit=">,
21 HelpText<"Maximum number of errors to print before exiting (default: 20)">,
23 def color_diagnostics: Flag<["--"], "color-diagnostics">,
24 HelpText<"Alias for --color-diagnostics=always">,
26 def no_color_diagnostics: Flag<["--"], "no-color-diagnostics">,
27 HelpText<"Alias for --color-diagnostics=never">,
29 def color_diagnostics_eq: Joined<["--"], "color-diagnostics=">,
30 HelpText<"Use colors in diagnostics (default: auto)">,
31 MetaVarName<"[auto,always,never]">,
33 def threads_eq : Joined<["--"], "threads=">,
34 HelpText<"Number of threads. '1' disables multi-threading. By default all available hardware threads are used">,
36 def thinlto_emit_imports_files: Flag<["--"], "thinlto-emit-imports-files">,
38 def thinlto_emit_index_files: Flag<["--"], "thinlto-emit-index-files">,
40 def thinlto_index_only: Flag<["--"], "thinlto-index-only">,
42 def thinlto_index_only_eq: Joined<["--"], "thinlto-index-only=">,
44 def thinlto_jobs_eq : Joined<["--"], "thinlto-jobs=">,
45 HelpText<"Number of ThinLTO jobs. Default to --threads=">,
47 def thinlto_object_suffix_replace_eq:
48 Joined<["--"], "thinlto-object-suffix-replace=">,
50 def thinlto_prefix_replace_eq: Joined<["--"], "thinlto-prefix-replace=">,
52 def reproduce: Separate<["--"], "reproduce">,
54 def reproduce_eq: Joined<["--"], "reproduce=">,
55 Alias<!cast<Separate>(reproduce)>,
56 HelpText<"Write tar file containing inputs and command to reproduce link">,
58 def version: Flag<["--"], "version">,
59 HelpText<"Display the version number and exit">,
61 def time_trace_eq: Joined<["--"], "time-trace=">,
62 HelpText<"Record time trace to <file>">,
63 MetaVarName<"<file>">,
65 def : Flag<["--"], "time-trace">,
67 HelpText<"Record time trace to file next to output">,
69 def time_trace_granularity_eq: Joined<["--"], "time-trace-granularity=">,
70 HelpText<"Minimum time granularity (in microseconds) traced by time profiler">,
72 def deduplicate_strings: Flag<["--"], "deduplicate-strings">,
73 HelpText<"Enable string deduplication">,
75 def no_deduplicate_strings: Flag<["--"], "no-deduplicate-strings">,
76 HelpText<"Disable string deduplication. This helps uncover cases of comparing string addresses instead of equality and might have a link time performance benefit.">,
78 def dead_strip_duplicates: Flag<["--"], "dead-strip-duplicates">,
79 HelpText<"Do not error on duplicate symbols that will be dead stripped.">,
81 def print_dylib_search: Flag<["--"], "print-dylib-search">,
82 HelpText<"Print which paths lld searched when trying to find dylibs">,
84 def icf_eq: Joined<["--"], "icf=">,
85 HelpText<"Set level for identical code folding (default: none)">,
86 MetaVarName<"[none,safe,all]">,
88 def lto_O: Joined<["--"], "lto-O">,
89 HelpText<"Set optimization level for LTO (default: 2)">,
90 MetaVarName<"<opt-level>">,
92 def lto_CGO: Joined<["--"], "lto-CGO">,
93 HelpText<"Set codegen optimization level for LTO (default: 2)">,
94 MetaVarName<"<cgopt-level>">,
96 def thinlto_cache_policy_eq: Joined<["--"], "thinlto-cache-policy=">,
97 HelpText<"Pruning policy for the ThinLTO cache">,
99 def O : JoinedOrSeparate<["-"], "O">,
100 HelpText<"Optimize output file size">;
101 def start_lib: Flag<["--"], "start-lib">,
102 HelpText<"Start a grouping of objects that should be treated as if they were together in an archive">;
103 def end_lib: Flag<["--"], "end-lib">,
104 HelpText<"End a grouping of objects that should be treated as if they were together in an archive">;
105 def no_warn_dylib_install_name: Flag<["--"], "no-warn-dylib-install-name">,
106 HelpText<"Do not warn on -install_name if -dylib is not passed (default)">,
108 def warn_dylib_install_name: Flag<["--"], "warn-dylib-install-name">,
109 HelpText<"Warn on -install_name if -dylib is not passed">,
111 def call_graph_profile_sort: Flag<["--"], "call-graph-profile-sort">,
112 HelpText<"Reorder sections with call graph profile (default)">,
114 def no_call_graph_profile_sort : Flag<["--"], "no-call-graph-profile-sort">,
115 HelpText<"Do not reorder sections with call graph profile">,
117 def print_symbol_order_eq: Joined<["--"], "print-symbol-order=">,
118 HelpText<"Print a symbol order specified by --call-graph-profile-sort into the specified file">,
120 def ignore_auto_link_option : Separate<["--"], "ignore-auto-link-option">,
122 def ignore_auto_link_option_eq : Joined<["--"], "ignore-auto-link-option=">,
123 Alias<!cast<Separate>(ignore_auto_link_option)>,
124 HelpText<"Ignore a single auto-linked library or framework. Useful to ignore invalid options that ld64 ignores">,
126 def strict_auto_link : Flag<["--"], "strict-auto-link">,
127 HelpText<"Always warn for missing frameworks or libraries if they are loaded via LC_LINKER_OPTIONS">,
129 def check_category_conflicts : Flag<["--"], "check-category-conflicts">,
130 HelpText<"Check for conflicts between category & class methods">,
132 def lto_debug_pass_manager: Flag<["--"], "lto-debug-pass-manager">,
133 HelpText<"Debug new pass manager">, Group<grp_lld>;
134 def cs_profile_generate: Flag<["--"], "cs-profile-generate">,
135 HelpText<"Perform context senstive PGO instrumentation">, Group<grp_lld>;
136 def cs_profile_path: Joined<["--"], "cs-profile-path=">,
137 HelpText<"Context sensitive profile file path">, Group<grp_lld>;
138 defm pgo_warn_mismatch: BB<"pgo-warn-mismatch",
139 "turn on warnings about profile cfg mismatch (default)",
140 "turn off warnings about profile cfg mismatch">, Group<grp_lld>;
142 // This is a complete Options.td compiled from Apple's ld(1) manpage
143 // dated 2018-03-07 and cross checked with ld64 source code in repo
144 // https://github.com/apple-opensource/ld64 at git tag "512.4" dated
147 // Flags<[HelpHidden]> marks options that are not yet ported to lld,
148 // and serve as a scoreboard for annotating our progress toward
149 // implementing ld64 options in lld. As you add implementions to
150 // Driver.cpp, please remove the hidden flag here.
152 def grp_kind : OptionGroup<"kind">, HelpText<"OUTPUT KIND">;
154 def execute : Flag<["-"], "execute">,
155 HelpText<"Produce a main executable (default)">,
157 def dylib : Flag<["-"], "dylib">,
158 HelpText<"Produce a shared library">,
160 def bundle : Flag<["-"], "bundle">,
161 HelpText<"Produce a bundle">,
163 def r : Flag<["-"], "r">,
164 HelpText<"Merge multiple object files into one, retaining relocations">,
167 def dylinker : Flag<["-"], "dylinker">,
168 HelpText<"Produce a dylinker only used when building dyld">,
171 def dynamic : Flag<["-"], "dynamic">,
172 HelpText<"Link dynamically (default)">,
174 def static : Flag<["-"], "static">,
175 HelpText<"Link statically">,
178 def preload : Flag<["-"], "preload">,
179 HelpText<"Produce an unsegmented binary for embedded systems">,
182 def arch : Separate<["-"], "arch">,
183 MetaVarName<"<arch_name>">,
184 HelpText<"The architecture (e.g. ppc, ppc64, i386, x86_64)">,
186 def o : Separate<["-"], "o">,
187 MetaVarName<"<path>">,
188 HelpText<"The name of the output file (default: `a.out')">,
191 def grp_libs : OptionGroup<"libs">, HelpText<"LIBRARIES">;
193 def l : Joined<["-"], "l">,
194 MetaVarName<"<name>">,
195 HelpText<"Search for lib<name>.dylib or lib<name>.a on the library search path">,
197 def weak_l : Joined<["-"], "weak-l">,
198 MetaVarName<"<name>">,
199 HelpText<"Like -l<name>, but mark library and its references as weak imports">,
201 def weak_library : Separate<["-"], "weak_library">,
202 MetaVarName<"<path>">,
203 HelpText<"Like bare <path>, but mark library and its references as weak imports">,
205 def needed_l : Joined<["-"], "needed-l">,
206 MetaVarName<"<name>">,
207 HelpText<"Like -l<name>, but link library even if its symbols are not used and -dead_strip_dylibs is active">,
209 def needed_library : Separate<["-"], "needed_library">,
210 MetaVarName<"<path>">,
211 HelpText<"Like bare <path>, but link library even if its symbols are not used and -dead_strip_dylibs is active">,
213 def reexport_l : Joined<["-"], "reexport-l">,
214 MetaVarName<"<name>">,
215 HelpText<"Like -l<name>, but export all symbols of <name> from newly created library">,
217 def reexport_library : Separate<["-"], "reexport_library">,
218 MetaVarName<"<path>">,
219 HelpText<"Like bare <path>, but export all symbols of <path> from newly created library">,
221 def upward_l : Joined<["-"], "upward-l">,
222 MetaVarName<"<name>">,
223 HelpText<"Like -l<name>, but specify dylib as an upward dependency">,
226 def upward_library : Separate<["-"], "upward_library">,
227 MetaVarName<"<path>">,
228 HelpText<"Like bare <path>, but specify dylib as an upward dependency">,
231 def L : JoinedOrSeparate<["-"], "L">,
232 MetaVarName<"<dir>">,
233 HelpText<"Add dir to the library search path">,
235 def Z : Flag<["-"], "Z">,
236 HelpText<"Remove standard directories from the library and framework search paths">,
238 def syslibroot : Separate<["-"], "syslibroot">,
239 MetaVarName<"<rootdir>">,
240 HelpText<"Prepend <rootdir> to all library and framework search paths">,
242 def search_paths_first : Flag<["-"], "search_paths_first">,
243 HelpText<"Search for lib<name>.dylib and lib<name>.a at each step in traversing search path (default for Xcode 4 and later)">,
245 def search_dylibs_first : Flag<["-"], "search_dylibs_first">,
246 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)">,
248 def framework : Separate<["-"], "framework">,
249 MetaVarName<"<name>">,
250 HelpText<"Search for <name>.framework/<name> on the framework search path">,
252 def weak_framework : Separate<["-"], "weak_framework">,
253 MetaVarName<"<name>">,
254 HelpText<"Like -framework <name>, but mark framework and its references as weak imports">,
256 def needed_framework : Separate<["-"], "needed_framework">,
257 MetaVarName<"<name>">,
258 HelpText<"Like -framework <name>, but link <name> even if none of its symbols are used and -dead_strip_dylibs is active">,
260 def reexport_framework : Separate<["-"], "reexport_framework">,
261 MetaVarName<"<name>">,
262 HelpText<"Like -framework <name>, but export all symbols of <name> from the newly created library">,
264 def upward_framework : Separate<["-"], "upward_framework">,
265 MetaVarName<"<name>">,
266 HelpText<"Like -framework <name>, but specify the framework as an upward dependency">,
269 def F : JoinedOrSeparate<["-"], "F">,
270 MetaVarName<"<dir>">,
271 HelpText<"Add dir to the framework search path">,
273 def all_load : Flag<["-"], "all_load">,
274 HelpText<"Load all members of all static archive libraries">,
276 def noall_load : Flag<["-"], "noall_load">,
277 HelpText<"Don't load all static members from archives, this is the default, this negates -all_load">,
279 def ObjC : Flag<["-"], "ObjC">,
280 HelpText<"Load all members of static archives that are an Objective-C class or category.">,
282 def force_load : Separate<["-"], "force_load">,
283 MetaVarName<"<path>">,
284 HelpText<"Load all members static archive library at <path>">,
286 def force_load_swift_libs : Flag<["-"], "force_load_swift_libs">,
287 HelpText<"Apply -force_load to libraries listed in LC_LINKER_OPTIONS whose names start with 'swift'">,
289 def load_hidden : Separate<["-"], "load_hidden">,
290 MetaVarName<"<path>">,
291 HelpText<"Load all symbols from static library with hidden visibility">,
293 def hidden_l : Joined<["-"], "hidden-l">,
294 MetaVarName<"<name>">,
295 HelpText<"Like -l<name>, but load all symbols with hidden visibility">,
298 def grp_content : OptionGroup<"content">, HelpText<"ADDITIONAL CONTENT">;
300 def sectcreate : MultiArg<["-"], "sectcreate", 3>,
301 MetaVarName<"<segment> <section> <file>">,
302 HelpText<"Create <section> in <segment> from the contents of <file>">,
304 def segcreate : MultiArg<["-"], "segcreate", 3>,
305 MetaVarName<"<segment> <section> <file>">,
307 HelpText<"Alias for -sectcreate">,
309 def add_empty_section : MultiArg<["-"], "add_empty_section", 2>,
310 MetaVarName<"<segment> <section>">,
311 HelpText<"Create an empty <section> in <segment>">,
313 def filelist : Separate<["-"], "filelist">,
314 MetaVarName<"<file>">,
315 HelpText<"Read names of files to link from <file>">,
317 def dtrace : Separate<["-"], "dtrace">,
318 MetaVarName<"<script>">,
319 HelpText<"Enable DTrace static probes according to declarations in <script>">,
323 def grp_opts : OptionGroup<"opts">, HelpText<"OPTIMIZATIONS">;
325 def dead_strip : Flag<["-"], "dead_strip">,
326 HelpText<"Remove unreachable functions and data">,
328 def order_file : Separate<["-"], "order_file">,
329 MetaVarName<"<file>">,
330 HelpText<"Layout functions and data according to specification in <file>">,
332 def no_order_inits : Flag<["-"], "no_order_inits">,
333 HelpText<"Disable default reordering of initializer and terminator functions">,
336 def no_order_data : Flag<["-"], "no_order_data">,
337 HelpText<"Disable default reordering of global data accessed at launch time">,
340 def image_base : Separate<["-"], "image_base">,
341 MetaVarName<"<address>">,
342 HelpText<"Preferred hex load address for a dylib or bundle.">,
345 def seg1addr : Separate<["-"], "seg1addr">,
346 MetaVarName<"<address>">,
348 HelpText<"Alias for -image_base">,
351 def no_implicit_dylibs : Flag<["-"], "no_implicit_dylibs">,
352 HelpText<"Do not optimize public dylib transitive symbol references">,
354 def exported_symbols_order : Separate<["-"], "exported_symbols_order">,
355 MetaVarName<"<file>">,
356 HelpText<"Specify frequently-used symbols in <file> to optimize symbol exports">,
359 def no_zero_fill_sections : Flag<["-"], "no_zero_fill_sections">,
360 HelpText<"Explicitly store zeroed data in the final image">,
363 def merge_zero_fill_sections : Flag<["-"], "merge_zero_fill_sections">,
364 HelpText<"Merge all zeroed data into the __zerofill section">,
367 def no_branch_islands : Flag<["-"], "no_branch_islands">,
368 HelpText<"Disable infra for branches beyond the maximum branch distance.">,
371 def no_deduplicate : Flag<["-"], "no_deduplicate">,
372 HelpText<"Disable code deduplication (synonym for `--icf=none')">,
373 Alias<icf_eq>, AliasArgs<["none"]>,
376 def grp_version : OptionGroup<"version">, HelpText<"VERSION TARGETING">;
378 def platform_version : MultiArg<["-"], "platform_version", 3>,
379 MetaVarName<"<platform> <min_version> <sdk_version>">,
380 HelpText<"Platform (e.g., macos, ios, tvos, watchos, bridgeos, mac-catalyst, ios-sim, tvos-sim, watchos-sim, driverkit) and version numbers">,
382 def sdk_version : Separate<["-"], "sdk_version">,
383 HelpText<"This option is undocumented in ld64">,
386 def macos_version_min : Separate<["-"], "macos_version_min">,
387 MetaVarName<"<version>">,
388 HelpText<"Oldest macOS version for which linked output is usable">,
390 def macosx_version_min : Separate<["-"], "macosx_version_min">,
391 MetaVarName<"<version>">,
392 Alias<macos_version_min>,
393 HelpText<"Alias for -macos_version_min">,
396 def ios_version_min : Separate<["-"], "ios_version_min">,
397 MetaVarName<"<version>">,
398 HelpText<"Oldest iOS version for which linked output is usable">,
401 def ios_simulator_version_min : Separate<["-"], "ios_simulator_version_min">,
402 MetaVarName<"<version>">,
403 HelpText<"Oldest iOS simulator version for which linked output is usable">,
406 def iphoneos_version_min : Separate<["-"], "iphoneos_version_min">,
407 MetaVarName<"<version>">,
408 Alias<ios_version_min>,
409 HelpText<"Alias for -ios_version_min">,
412 def maccatalyst_version_min : Separate<["-"], "maccatalyst_version_min">,
413 MetaVarName<"<version>">,
414 HelpText<"Oldest MacCatalyst version for which linked output is usable">,
417 def iosmac_version_min : Separate<["-"], "iosmac_version_min">,
418 MetaVarName<"<version>">,
419 Alias<maccatalyst_version_min>,
420 HelpText<"Alias for -maccatalyst_version_min">,
423 def uikitformac_version_min : Separate<["-"], "uikitformac_version_min">,
424 MetaVarName<"<version>">,
425 Alias<maccatalyst_version_min>,
426 HelpText<"Alias for -maccatalyst_version_min">,
429 def tvos_version_min : Separate<["-"], "tvos_version_min">,
430 MetaVarName<"<version>">,
431 HelpText<"Oldest tvOS version for which linked output is usable">,
434 def watchos_version_min : Separate<["-"], "watchos_version_min">,
435 MetaVarName<"<version>">,
436 HelpText<"Oldest watchOS version for which linked output is usable">,
439 def bridgeos_version_min : Separate<["-"], "bridgeos_version_min">,
440 MetaVarName<"<version>">,
441 HelpText<"Oldest bridgeOS version for which linked output is usable">,
444 def driverkit_version_min : Separate<["-"], "driverkit_version_min">,
445 MetaVarName<"<version>">,
446 HelpText<"Oldest DriverKit version for which linked output is usable">,
450 def grp_dylib : OptionGroup<"dylib">, HelpText<"DYNAMIC LIBRARIES (DYLIB)">;
452 def install_name : Separate<["-"], "install_name">,
453 MetaVarName<"<name>">,
454 HelpText<"Set an internal install path in a dylib">,
456 def dylib_install_name : Separate<["-"], "dylib_install_name">,
457 MetaVarName<"<name>">,
459 HelpText<"Alias for -install_name">,
461 def dylinker_install_name : Separate<["-"], "dylinker_install_name">,
462 MetaVarName<"<name>">,
464 HelpText<"Alias for -install_name">,
466 def mark_dead_strippable_dylib : Flag<["-"], "mark_dead_strippable_dylib">,
467 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">,
469 def compatibility_version : Separate<["-"], "compatibility_version">,
470 MetaVarName<"<version>">,
471 HelpText<"Compatibility <version> of this library">,
473 def dylib_compatibility_version : Separate<["-"], "dylib_compatibility_version">,
474 MetaVarName<"<version>">,
475 Alias<compatibility_version>,
476 HelpText<"Alias for -compatibility_version">,
479 def current_version : Separate<["-"], "current_version">,
480 MetaVarName<"<version>">,
481 HelpText<"Current <version> of this library">,
483 def dylib_current_version : Separate<["-"], "dylib_current_version">,
484 MetaVarName<"<version>">,
485 Alias<current_version>,
486 HelpText<"Alias for -current_version">,
490 def grp_main : OptionGroup<"main">, HelpText<"MAIN EXECUTABLE">;
492 def pie : Flag<["-"], "pie">,
493 HelpText<"Build a position independent executable (default)">,
495 def no_pie : Flag<["-"], "no_pie">,
496 HelpText<"Do not build a position independent executable">,
498 def pagezero_size : Separate<["-"], "pagezero_size">,
499 MetaVarName<"<size>">,
500 HelpText<"Size of unreadable segment at address zero is hex <size> (default is 4KB on 32-bit and 4GB on 64-bit)">,
502 def stack_size : Separate<["-"], "stack_size">,
503 MetaVarName<"<size>">,
504 HelpText<"Maximum hex stack size for the main thread in a program. (default is 8MB)">,
507 def allow_stack_execute : Flag<["-"], "allow_stack_execute">,
508 HelpText<"Mark stack segment as executable">,
511 def export_dynamic : Flag<["-"], "export_dynamic">,
512 HelpText<"Preserve all global symbols during LTO and when dead-stripping executables">,
515 def grp_bundle : OptionGroup<"bundle">, HelpText<"CREATING A BUNDLE">;
517 def bundle_loader : Separate<["-"], "bundle_loader">,
518 MetaVarName<"<executable>">,
519 HelpText<"Resolve undefined symbols from <executable>">,
522 def grp_object : OptionGroup<"object">, HelpText<"CREATING AN OBJECT FILE">;
524 def keep_private_externs : Flag<["-"], "keep_private_externs">,
525 HelpText<"Do not convert private external symbols to static symbols (only valid with -r)">,
528 def d : Flag<["-"], "d">,
529 HelpText<"Force tentative into real definitions for common symbols">,
533 def grp_resolve : OptionGroup<"resolve">, HelpText<"SYMBOL RESOLUTION">;
535 def exported_symbol : Separate<["-"], "exported_symbol">,
536 MetaVarName<"<symbol>">,
537 HelpText<"<symbol> remains global, while others become private externs">,
539 def exported_symbols_list : Separate<["-"], "exported_symbols_list">,
540 MetaVarName<"<file>">,
541 HelpText<"Symbols specified in <file> remain global, while others become private externs">,
543 def no_exported_symbols : Flag<["-"], "no_exported_symbols">,
544 HelpText<"Don't export any symbols from the binary, useful for main executables that don't have plugins">,
546 def unexported_symbol : Separate<["-"], "unexported_symbol">,
547 MetaVarName<"<symbol>">,
548 HelpText<"Global <symbol> becomes private extern">,
550 def unexported_symbols_list : Separate<["-"], "unexported_symbols_list">,
551 MetaVarName<"<file>">,
552 HelpText<"Global symbols specified in <file> become private externs">,
554 def reexported_symbols_list : Separate<["-"], "reexported_symbols_list">,
555 MetaVarName<"<file>">,
556 HelpText<"Symbols from dependent dylibs specified in <file> are reexported by this dylib">,
559 def alias : MultiArg<["-"], "alias", 2>,
560 MetaVarName<"<symbol_name> <alternate_name>">,
561 HelpText<"Create a symbol alias with default global visibility">,
563 def alias_list : Separate<["-"], "alias_list">,
564 MetaVarName<"<file>">,
565 HelpText<"Create symbol aliases specified in <file>">,
568 def flat_namespace : Flag<["-"], "flat_namespace">,
569 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">,
571 def twolevel_namespace : Flag<["-"], "twolevel_namespace">,
572 HelpText<"Make dyld look up symbols by (dylib,name) pairs (default)">,
574 def u : Separate<["-"], "u">,
575 MetaVarName<"<symbol>">,
576 HelpText<"Require that <symbol> be defined for the link to succeed">,
578 def U : Separate<["-"], "U">,
579 MetaVarName<"<symbol>">,
580 HelpText<"Allow <symbol> to have no definition">,
582 def undefined : Separate<["-"], "undefined">,
583 MetaVarName<"<treatment>">,
584 HelpText<"Handle undefined symbols according to <treatment>: error, warning, suppress, or dynamic_lookup (default is error)">,
586 def rpath : Separate<["-"], "rpath">,
587 MetaVarName<"<path>">,
588 HelpText<"Add <path> to dyld search list for dylibs with load path prefix `@rpath/'">,
590 def commons : Separate<["-"], "commons">,
591 MetaVarName<"<treatment>">,
592 HelpText<"Resolve tentative definitions in dylibs according to <treatment>: ignore_dylibs, use_dylibs, error (default is ignore_dylibs)">,
596 def grp_introspect : OptionGroup<"introspect">, HelpText<"INTROSPECTING THE LINKER">;
598 def why_load : Flag<["-"], "why_load">,
599 HelpText<"Log why each object file is loaded from a static library">,
600 Group<grp_introspect>;
601 def whyload : Flag<["-"], "whyload">,
603 HelpText<"Alias for -why_load">,
604 Group<grp_introspect>;
605 def why_live : Separate<["-"], "why_live">,
606 MetaVarName<"<symbol>">,
607 HelpText<"Log a chain of references to <symbol>, for use with -dead_strip">,
608 Group<grp_introspect>;
609 def print_statistics : Flag<["-"], "print_statistics">,
610 HelpText<"Log the linker's memory and CPU usage">,
612 Group<grp_introspect>;
613 def t : Flag<["-"], "t">,
614 HelpText<"Log every file the linker loads: object, archive, and dylib">,
615 Group<grp_introspect>;
616 def whatsloaded : Flag<["-"], "whatsloaded">,
617 HelpText<"Logs only the object files the linker loads">,
619 Group<grp_introspect>;
620 def order_file_statistics : Flag<["-"], "order_file_statistics">,
621 HelpText<"Logs information about -order_file">,
623 Group<grp_introspect>;
624 def map : Separate<["-"], "map">,
625 MetaVarName<"<path>">,
626 HelpText<"Writes all symbols and their addresses to <path>">,
627 Group<grp_introspect>;
628 def dependency_info : Separate<["-"], "dependency_info">,
629 MetaVarName<"<path>">,
630 HelpText<"Dump dependency info">,
631 Group<grp_introspect>;
632 def save_temps : Flag<["-"], "save-temps">,
633 HelpText<"Save intermediate LTO compilation results">,
634 Group<grp_introspect>;
636 def grp_symtab : OptionGroup<"symtab">, HelpText<"SYMBOL TABLE">;
638 def S : Flag<["-"], "S">,
639 HelpText<"Strip debug information (STABS or DWARF) from the output">,
641 def x : Flag<["-"], "x">,
642 HelpText<"Exclude non-global symbols from the output symbol table">,
644 def non_global_symbols_strip_list : Separate<["-"], "non_global_symbols_strip_list">,
645 MetaVarName<"<path>">,
646 HelpText<"Specify in <path> the non-global symbols that should be removed from the output symbol table">,
648 def non_global_symbols_no_strip_list : Separate<["-"], "non_global_symbols_no_strip_list">,
649 MetaVarName<"<path>">,
650 HelpText<"Specify in <path> the non-global symbols that should remain in the output symbol table">,
652 def oso_prefix : Separate<["-"], "oso_prefix">,
653 MetaVarName<"<path>">,
654 HelpText<"Remove the prefix <path> from OSO symbols in the debug map">,
656 def add_ast_path : Separate<["-"], "add_ast_path">,
657 MetaVarName<"<path>">,
658 HelpText<"AST paths will be emitted as STABS">,
661 def grp_rare : OptionGroup<"rare">, HelpText<"RARELY USED">;
663 def v : Flag<["-"], "v">,
664 HelpText<"Print the linker version and search paths in addition to linking">,
666 def adhoc_codesign : Flag<["-"], "adhoc_codesign">,
667 HelpText<"Write an ad-hoc code signature to the output file (default for arm64 binaries)">,
669 def no_adhoc_codesign : Flag<["-"], "no_adhoc_codesign">,
670 HelpText<"Do not write an ad-hoc code signature to the output file (default for x86_64 binaries)">,
672 def reproducible : Flag<["-"], "reproducible">,
673 HelpText<"Make the output reproducible by removing timestamps and other non-deterministic data. This is the default behavior.">,
675 def version_details : Flag<["-"], "version_details">,
676 HelpText<"Print the linker version in JSON form">,
679 def no_weak_imports : Flag<["-"], "no_weak_imports">,
680 HelpText<"Fail if any symbols are weak imports, allowed to be NULL at runtime">,
683 def verbose_deduplicate : Flag<["-"], "verbose_deduplicate">,
684 HelpText<"Print function names eliminated by deduplication and the total size of code savings">,
687 def no_inits : Flag<["-"], "no_inits">,
688 HelpText<"Fail if the output contains static initializers">,
691 def no_warn_inits : Flag<["-"], "no_warn_inits">,
692 HelpText<"Suppress warnings for static initializers in the output">,
695 def unaligned_pointers : Separate<["-"], "unaligned_pointers">,
696 MetaVarName<"<treatment>">,
697 HelpText<"Handle unaligned pointers in __DATA segments according to <treatment>: warning, error, or suppress (default for arm64e is error, otherwise suppress)">,
700 def dirty_data_list : Separate<["-"], "dirty_data_list">,
701 MetaVarName<"<path>">,
702 HelpText<"Specify data symbols in <path> destined for the __DATA_DIRTY segment">,
705 def max_default_common_align : Separate<["-"], "max_default_common_align">,
706 MetaVarName<"<boundary>">,
707 HelpText<"Reduce maximum alignment for common symbols to a hex power-of-2 <boundary>">,
710 def move_to_rw_segment : MultiArg<["-"], "move_to_rw_segment", 2>,
711 MetaVarName<"<segment> <path>">,
712 HelpText<"Move data symbols listed in <path> to another <segment>">,
715 def move_to_ro_segment : MultiArg<["-"], "move_to_ro_segment", 2>,
716 MetaVarName<"<segment> <path>">,
717 HelpText<"Move code symbols listed in <path> to another <segment>">,
720 def rename_section : MultiArg<["-"], "rename_section", 4>,
721 MetaVarName<"<from_segment> <from_section> <to_segment> <to_section>">,
722 HelpText<"Rename <from_segment>/<from_section> as <to_segment>/<to_section>">,
724 def rename_segment : MultiArg<["-"], "rename_segment", 2>,
725 MetaVarName<"<from_segment> <to_segment>">,
726 HelpText<"Rename <from_segment> as <to_segment>">,
728 def trace_symbol_layout : Flag<["-"], "trace_symbol_layout">,
729 HelpText<"Show where and why symbols move, as specified by -move_to_ro_segment, -move_to_rw_segment, -rename_section, and -rename_segment">,
732 def data_const : Flag<["-"], "data_const">,
733 HelpText<"Force migration of readonly data into __DATA_CONST segment">,
735 def no_data_const : Flag<["-"], "no_data_const">,
736 HelpText<"Block migration of readonly data away from __DATA segment">,
738 def text_exec : Flag<["-"], "text_exec">,
739 HelpText<"Rename __segment TEXT to __TEXT_EXEC for sections __text and __stubs">,
742 def section_order : MultiArg<["-"], "section_order", 2>,
743 MetaVarName<"<segment> <sections>">,
744 HelpText<"With -preload, specify layout sequence of colon-separated <sections> in <segment>">,
747 def segment_order : Separate<["-"], "segment_order">,
748 MetaVarName<"<colon_separated_segment_list>">,
749 HelpText<"With -preload, specify layout sequence of colon-separated <segments>">,
752 def allow_heap_execute : Flag<["-"], "allow_heap_execute">,
753 HelpText<"On i386, allow any page to execute code">,
756 def application_extension : Flag<["-"], "application_extension">,
757 HelpText<"Mark output as safe for use in an application extension, and validate that linked dylibs are safe">,
759 def no_application_extension : Flag<["-"], "no_application_extension">,
760 HelpText<"Disable application extension functionality (default)">,
762 def fatal_warnings : Flag<["-"], "fatal_warnings">,
763 HelpText<"Treat warnings as errors">,
765 def no_eh_labels : Flag<["-"], "no_eh_labels">,
766 HelpText<"In -r mode, suppress .eh labels in the __eh_frame section">,
769 def warn_compact_unwind : Flag<["-"], "warn_compact_unwind">,
770 HelpText<"Warn for each FDE that cannot compact into the __unwind_info section and must remain in the __eh_frame section">,
773 def warn_weak_exports : Flag<["-"], "warn_weak_exports">,
774 HelpText<"Warn if the linked image contains weak external symbols">,
777 def no_weak_exports : Flag<["-"], "no_weak_exports">,
778 HelpText<"Fail if the linked image contains weak external symbols">,
781 def objc_gc_compaction : Flag<["-"], "objc_gc_compaction">,
782 HelpText<"Mark the Objective-C image as compatible with compacting garbage collection">,
785 def objc_gc : Flag<["-"], "objc_gc">,
786 HelpText<"Verify that all code was compiled with -fobjc-gc or -fobjc-gc-only">,
789 def objc_gc_only : Flag<["-"], "objc_gc_only">,
790 HelpText<"Verify that all code was compiled with -fobjc-gc-only">,
793 def dead_strip_dylibs : Flag<["-"], "dead_strip_dylibs">,
794 HelpText<"Remove dylibs that are unreachable by the entry point or exported symbols">,
796 def allow_sub_type_mismatches : Flag<["-"], "allow_sub_type_mismatches">,
797 HelpText<"Permit mixing objects compiled for different ARM CPU subtypes">,
800 def no_uuid : Flag<["-"], "no_uuid">,
801 HelpText<"Do not generate the LC_UUID load command">,
803 def root_safe : Flag<["-"], "root_safe">,
804 HelpText<"Set the MH_ROOT_SAFE bit in the mach-o header">,
807 def setuid_safe : Flag<["-"], "setuid_safe">,
808 HelpText<"Set the MH_SETUID_SAFE bit in the mach-o header">,
811 def interposable : Flag<["-"], "interposable">,
812 HelpText<"Indirects access to all to exported symbols in a dylib">,
815 def multi_module : Flag<["-"], "multi_module">,
817 HelpText<"Alias for -interposable">,
820 def init : Separate<["-"], "init">,
821 MetaVarName<"<symbol>">,
822 HelpText<"Run <symbol> as the first initializer in a dylib">,
825 def sub_library : Separate<["-"], "sub_library">,
826 MetaVarName<"<name>">,
827 HelpText<"Re-export the dylib as <name>">,
829 def sub_umbrella : Separate<["-"], "sub_umbrella">,
830 MetaVarName<"<name>">,
831 HelpText<"Re-export the framework as <name>">,
833 def allowable_client : Separate<["-"], "allowable_client">,
834 MetaVarName<"<name>">,
835 HelpText<"Specify <name> of a dylib or framework that is allowed to link to this dylib">,
838 def client_name : Separate<["-"], "client_name">,
839 MetaVarName<"<name>">,
840 HelpText<"Specifies a <name> this client should match with the -allowable_client <name> in a dependent dylib">,
843 def umbrella : Separate<["-"], "umbrella">,
844 MetaVarName<"<name>">,
845 HelpText<"Re-export this dylib through the umbrella framework <name>">,
847 def headerpad : Separate<["-"], "headerpad">,
848 MetaVarName<"<size>">,
849 HelpText<"Allocate hex <size> extra space for future expansion of the load commands via install_name_tool (default is 0x20)">,
851 def headerpad_max_install_names : Flag<["-"], "headerpad_max_install_names">,
852 HelpText<"Allocate extra space so all load-command paths can expand to MAXPATHLEN via install_name_tool">,
854 def bind_at_load : Flag<["-"], "bind_at_load">,
855 HelpText<"Tell dyld to bind all symbols at load time, rather than lazily">,
858 def force_flat_namespace : Flag<["-"], "force_flat_namespace">,
859 HelpText<"Tell dyld to use a flat namespace on this executable and all its dependent dylibs & bundles">,
862 def segalign : Separate<["-"], "segalign">,
863 MetaVarName<"<boundary>">,
864 HelpText<"Align all segments to hex power-of-2 <boundary>">,
867 def sectalign : MultiArg<["-"], "sectalign", 3>,
868 MetaVarName<"<segment> <section> <boundary>">,
869 HelpText<"Align <section> within <segment> to hex power-of-2 <boundary>">,
871 def stack_addr : Separate<["-"], "stack_addr">,
872 MetaVarName<"<address>">,
873 HelpText<"Initialize stack pointer to hex <address> rounded to a page boundary">,
876 def segprot : MultiArg<["-"], "segprot", 3>,
877 MetaVarName<"<segment> <max> <init>">,
878 HelpText<"Specifies the <max> and <init> virtual memory protection of <segment> as r/w/x/-seg_addr_table path">,
880 def segs_read_write_addr : Separate<["-"], "segs_read_write_addr">,
881 MetaVarName<"<address>">,
882 HelpText<"This option is obsolete">,
885 def segs_read_only_addr : Separate<["-"], "segs_read_only_addr">,
886 MetaVarName<"<address>">,
887 HelpText<"This option is obsolete">,
890 def segaddr : MultiArg<["-"], "segaddr", 2>,
891 MetaVarName<"<segment> <address>">,
892 HelpText<"Specify the starting hex <address> at a 4KiB page boundary for <segment>">,
895 def seg_page_size : MultiArg<["-"], "seg_page_size", 2>,
896 MetaVarName<"<segment> <size>">,
897 HelpText<"Specifies the page <size> for <segment>. Segment size will be a multiple of its page size">,
900 def dylib_file : Separate<["-"], "dylib_file">,
901 MetaVarName<"<install_path:current_path>">,
902 HelpText<"Specify <current_path> as different from where a dylib normally resides at <install_path>">,
905 def weak_reference_mismatches : Separate<["-"], "weak_reference_mismatches">,
906 MetaVarName<"<treatment>">,
907 HelpText<"Resolve symbol imports of conflicting weakness according to <treatment> as weak, non-weak, or error (default is non-weak)">,
910 def read_only_relocs : Separate<["-"], "read_only_relocs">,
911 MetaVarName<"<treatment>">,
912 HelpText<"Handle relocations that modify read-only pages according to <treatment> of warning, error, or suppress (i.e., allow)">,
915 def force_cpusubtype_ALL : Flag<["-"], "force_cpusubtype_ALL">,
916 HelpText<"Mark binary as runnable on any PowerPC, ignoring any PowerPC cpu requirements encoded in the object files">,
919 def no_arch_warnings : Flag<["-"], "no_arch_warnings">,
920 HelpText<"Suppresses warnings about inputs whose architecture does not match the -arch option">,
923 def arch_errors_fatal : Flag<["-"], "arch_errors_fatal">,
924 HelpText<"Escalate to errors any warnings about inputs whose architecture does not match the -arch option">,
926 def e : Separate<["-"], "e">,
927 MetaVarName<"<symbol>">,
928 HelpText<"Make <symbol> the entry point of an executable (default is \"start\" from crt1.o)">,
930 def w : Flag<["-"], "w">,
931 HelpText<"Suppress all warnings">,
933 def final_output : Separate<["-"], "final_output">,
934 MetaVarName<"<name>">,
935 HelpText<"Specify dylib install name if -install_name is not used; used by compiler driver for multiple -arch arguments">,
937 def arch_multiple : Flag<["-"], "arch_multiple">,
938 HelpText<"Augment error and warning messages with the architecture name">,
940 def dot : Separate<["-"], "dot">,
941 MetaVarName<"<path>">,
942 HelpText<"Write a graph of symbol dependencies to <path> as a .dot file viewable with GraphViz">,
945 def keep_relocs : Flag<["-"], "keep_relocs">,
946 HelpText<"Retain section-based relocation records in the output, which are ignored at runtime by dyld">,
949 def warn_stabs : Flag<["-"], "warn_stabs">,
950 HelpText<"Warn when bad stab symbols inside a BINCL/EINCL prevent optimization">,
953 def warn_commons : Flag<["-"], "warn_commons">,
954 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">,
957 def read_only_stubs : Flag<["-"], "read_only_stubs">,
958 HelpText<"On i386, make the __IMPORT segment of a final linked image read-only">,
961 def interposable_list : Separate<["-"], "interposable_list">,
962 MetaVarName<"<path>">,
963 HelpText<"Access global symbols listed in <path> indirectly">,
966 def no_function_starts : Flag<["-"], "no_function_starts">,
967 HelpText<"Do not create table of function start addresses">,
969 def no_objc_category_merging : Flag<["-"], "no_objc_category_merging">,
970 HelpText<"Do not merge Objective-C categories into their classes">,
973 def object_path_lto : Separate<["-"], "object_path_lto">,
974 MetaVarName<"<path>">,
975 HelpText<"Retain any temporary mach-o file in <path> that would otherwise be deleted during LTO">,
977 def cache_path_lto : Separate<["-"], "cache_path_lto">,
978 MetaVarName<"<path>">,
979 HelpText<"Use <path> as a directory for the incremental LTO cache">,
981 def prune_interval_lto : Separate<["-"], "prune_interval_lto">,
982 MetaVarName<"<seconds>">,
983 HelpText<"Prune the incremental LTO cache after <seconds> (-1 disables pruning)">,
985 def prune_after_lto : Separate<["-"], "prune_after_lto">,
986 MetaVarName<"<seconds>">,
987 HelpText<"Remove LTO cache entries after <seconds>">,
989 def max_relative_cache_size_lto : Separate<["-"], "max_relative_cache_size_lto">,
990 MetaVarName<"<percent>">,
991 HelpText<"Limit the incremental LTO cache growth to <percent> of free disk, space">,
993 def page_align_data_atoms : Flag<["-"], "page_align_data_atoms">,
994 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">,
997 def not_for_dyld_shared_cache : Flag<["-"], "not_for_dyld_shared_cache">,
998 HelpText<"Prevent system dylibs from being placed into the dylib shared cache">,
1001 def mllvm : Separate<["-"], "mllvm">,
1002 HelpText<"Options to pass to LLVM">,
1004 def mcpu : Separate<["-"], "mcpu">,
1005 HelpText<"Processor family target for LTO code generation">,
1007 def no_dtrace_dof : Flag<["-"], "no_dtrace_dof">,
1008 HelpText<"Disable dtrace-dof processing (default).">,
1010 def objc_stubs_fast : Flag<["-"], "objc_stubs_fast">,
1011 HelpText<"Produce larger stubs for Objective-C method calls with fewer jumps (default).">,
1013 def objc_stubs_small : Flag<["-"], "objc_stubs_small">,
1014 HelpText<"Produce smaller stubs for Objective-C method calls with more jumps.">,
1016 def dyld_env : Separate<["-"], "dyld_env">,
1017 MetaVarName<"<dyld_env_var>">,
1018 HelpText<"Specifies a LC_DYLD_ENVIRONMENT variable value pair.">,
1020 def ignore_auto_link : Flag<["-"], "ignore_auto_link">,
1021 HelpText<"Ignore LC_LINKER_OPTIONs">,
1024 def grp_deprecated : OptionGroup<"deprecated">, HelpText<"DEPRECATED">;
1026 def lazy_framework : Separate<["-"], "lazy_framework">,
1027 MetaVarName<"<name>">,
1028 HelpText<"This option is deprecated and is now an alias for -framework.">,
1029 Flags<[HelpHidden]>,
1030 Group<grp_deprecated>;
1031 def lazy_library : Separate<["-"], "lazy_library">,
1032 MetaVarName<"<path>">,
1033 HelpText<"This option is deprecated and is now an alias for regular linking">,
1034 Flags<[HelpHidden]>,
1035 Group<grp_deprecated>;
1036 def lazy_l : Joined<["-"], "lazy-l">,
1037 MetaVarName<"<name>">,
1038 HelpText<"This option is deprecated and is now an alias for -l<path>.">,
1039 Flags<[HelpHidden]>,
1040 Group<grp_deprecated>;
1041 def single_module : Flag<["-"], "single_module">,
1042 HelpText<"Unnecessary option: this is already the default">,
1043 Flags<[HelpHidden]>,
1044 Group<grp_deprecated>;
1045 def no_dead_strip_inits_and_terms : Flag<["-"], "no_dead_strip_inits_and_terms">,
1046 HelpText<"Unnecessary option: initialization and termination are roots of the dead strip graph, so never dead stripped">,
1047 Flags<[HelpHidden]>,
1048 Group<grp_deprecated>;
1050 def grp_obsolete : OptionGroup<"obsolete">, HelpText<"OBSOLETE">;
1052 def sectorder : MultiArg<["-"], "sectorder", 3>,
1053 MetaVarName<"<segname> <sectname> <orderfile>">,
1054 HelpText<"Obsolete. Replaced by more general -order_file option">,
1055 Group<grp_obsolete>;
1056 def lto_library : Separate<["-"], "lto_library">,
1057 MetaVarName<"<path>">,
1058 HelpText<"Obsolete. LLD supports LTO directly, without using an external dylib.">,
1059 Group<grp_obsolete>;
1060 def y : Joined<["-"], "y">,
1061 MetaVarName<"<symbol>">,
1062 HelpText<"This option is obsolete in ld64">,
1063 Flags<[HelpHidden]>,
1064 Group<grp_obsolete>;
1065 def sectobjectsymbols : MultiArg<["-"], "sectobjectsymbols", 2>,
1066 MetaVarName<"<segname> <sectname>">,
1067 HelpText<"This option is obsolete in ld64">,
1068 Flags<[HelpHidden]>,
1069 Group<grp_obsolete>;
1070 def nofixprebinding : Flag<["-"], "nofixprebinding">,
1071 HelpText<"This option is obsolete in ld64">,
1072 Flags<[HelpHidden]>,
1073 Group<grp_obsolete>;
1074 def noprebind_all_twolevel_modules : Flag<["-"], "noprebind_all_twolevel_modules">,
1075 HelpText<"This option is obsolete in ld64">,
1076 Flags<[HelpHidden]>,
1077 Group<grp_obsolete>;
1078 def prebind_all_twolevel_modules : Flag<["-"], "prebind_all_twolevel_modules">,
1079 HelpText<"This option is obsolete in ld64">,
1080 Flags<[HelpHidden]>,
1081 Group<grp_obsolete>;
1082 def prebind_allow_overlap : Flag<["-"], "prebind_allow_overlap">,
1083 HelpText<"This option is obsolete in ld64">,
1084 Flags<[HelpHidden]>,
1085 Group<grp_obsolete>;
1086 def noprebind : Flag<["-"], "noprebind">,
1087 HelpText<"This option is obsolete in ld64">,
1088 Flags<[HelpHidden]>,
1089 Group<grp_obsolete>;
1090 def sect_diff_relocs : Separate<["-"], "sect_diff_relocs">,
1091 MetaVarName<"<treatment>">,
1092 HelpText<"This option is obsolete in ld64">,
1093 Flags<[HelpHidden]>,
1094 Group<grp_obsolete>;
1095 def A : Separate<["-"], "A">,
1096 MetaVarName<"<basefile>">,
1097 HelpText<"This option is obsolete in ld64">,
1098 Flags<[HelpHidden]>,
1099 Group<grp_obsolete>;
1100 def b : Flag<["-"], "b">,
1101 HelpText<"This option is obsolete in ld64">,
1102 Flags<[HelpHidden]>,
1103 Group<grp_obsolete>;
1104 def Sn : Flag<["-"], "Sn">,
1105 HelpText<"This option is obsolete in ld64">,
1106 Flags<[HelpHidden]>,
1107 Group<grp_obsolete>;
1108 def Si : Flag<["-"], "Si">,
1109 HelpText<"This option is obsolete in ld64">,
1110 Flags<[HelpHidden]>,
1111 Group<grp_obsolete>;
1112 def Sp : Flag<["-"], "Sp">,
1113 HelpText<"This option is obsolete in ld64">,
1114 Flags<[HelpHidden]>,
1115 Group<grp_obsolete>;
1116 def X : Flag<["-"], "X">,
1117 HelpText<"This option is obsolete in ld64">,
1118 Flags<[HelpHidden]>,
1119 Group<grp_obsolete>;
1120 def s : Flag<["-"], "s">,
1121 HelpText<"This option is obsolete in ld64">,
1122 Flags<[HelpHidden]>,
1123 Group<grp_obsolete>;
1124 def m : Flag<["-"], "m">,
1125 HelpText<"This option is obsolete in ld64">,
1126 Flags<[HelpHidden]>,
1127 Group<grp_obsolete>;
1128 def Y : Separate<["-"], "Y">,
1129 MetaVarName<"<number>">,
1130 HelpText<"This option is obsolete in ld64">,
1131 Flags<[HelpHidden]>,
1132 Group<grp_obsolete>;
1133 def nomultidefs : Flag<["-"], "nomultidefs">,
1134 HelpText<"This option is obsolete in ld64">,
1135 Flags<[HelpHidden]>,
1136 Group<grp_obsolete>;
1137 def multiply_defined_unused : Separate<["-"], "multiply_defined_unused">,
1138 MetaVarName<"<treatment>">,
1139 HelpText<"This option is obsolete in ld64">,
1140 Flags<[HelpHidden]>,
1141 Group<grp_obsolete>;
1142 def multiply_defined : Separate<["-"], "multiply_defined">,
1143 MetaVarName<"<treatment>">,
1144 HelpText<"This option is obsolete in ld64">,
1145 Flags<[HelpHidden]>,
1146 Group<grp_obsolete>;
1147 def private_bundle : Flag<["-"], "private_bundle">,
1148 HelpText<"This option is obsolete in ld64">,
1149 Flags<[HelpHidden]>,
1150 Group<grp_obsolete>;
1151 def seg_addr_table_filename : Separate<["-"], "seg_addr_table_filename">,
1152 MetaVarName<"<path>">,
1153 HelpText<"This option is obsolete in ld64">,
1154 Flags<[HelpHidden]>,
1155 Group<grp_obsolete>;
1156 def sectorder_detail : Flag<["-"], "sectorder_detail">,
1157 HelpText<"This option is obsolete in ld64">,
1158 Flags<[HelpHidden]>,
1159 Group<grp_obsolete>;
1160 def no_compact_linkedit : Flag<["-"], "no_compact_linkedit">,
1161 HelpText<"This option is obsolete in ld64">,
1162 Flags<[HelpHidden]>,
1163 Group<grp_obsolete>;
1164 def dependent_dr_info : Flag<["-"], "dependent_dr_info">,
1165 HelpText<"This option is obsolete in ld64">,
1166 Flags<[HelpHidden]>,
1167 Group<grp_obsolete>;
1168 def no_dependent_dr_info : Flag<["-"], "no_dependent_dr_info">,
1169 HelpText<"This option is obsolete in ld64">,
1170 Flags<[HelpHidden]>,
1171 Group<grp_obsolete>;
1172 def seglinkedit : Flag<["-"], "seglinkedit">,
1173 HelpText<"This option is obsolete in ld64">,
1174 Flags<[HelpHidden]>,
1175 Group<grp_obsolete>;
1176 def noseglinkedit : Flag<["-"], "noseglinkedit">,
1177 HelpText<"This option is obsolete in ld64">,
1178 Flags<[HelpHidden]>,
1179 Group<grp_obsolete>;
1180 def fvmlib : Flag<["-"], "fvmlib">,
1181 HelpText<"This option is obsolete in ld64">,
1182 Flags<[HelpHidden]>,
1183 Group<grp_obsolete>;
1184 def run_init_lazily : Flag<["-"], "run_init_lazily">,
1185 HelpText<"This option is obsolete in ld64">,
1186 Flags<[HelpHidden]>,
1187 Group<grp_obsolete>;
1188 def prebind : Flag<["-"], "prebind">,
1189 HelpText<"This option is obsolete in ld64">,
1190 Flags<[HelpHidden]>,
1191 Group<grp_obsolete>;
1192 def twolevel_namespace_hints : Flag<["-"], "twolevel_namespace_hints">,
1193 HelpText<"This option is obsolete in ld64">,
1194 Flags<[HelpHidden]>,
1195 Group<grp_obsolete>;
1196 def slow_stubs : Flag<["-"], "slow_stubs">,
1197 HelpText<"This option is obsolete in ld64">,
1198 Flags<[HelpHidden]>,
1199 Group<grp_obsolete>;
1201 def bitcode_bundle : Flag<["-"], "bitcode_bundle">,
1202 HelpText<"Obsolete since the App Store no longer supports binaries with embedded bitcode">,
1203 Flags<[HelpHidden]>,
1204 Group<grp_obsolete>;
1205 def bitcode_hide_symbols : Flag<["-"], "bitcode_hide_symbols">,
1206 HelpText<"Obsolete since the App Store no longer supports binaries with embedded bitcode">,
1207 Flags<[HelpHidden]>,
1208 Group<grp_obsolete>;
1209 def bitcode_symbol_map : Separate<["-"], "bitcode_symbol_map">,
1210 MetaVarName<"<path>">,
1211 HelpText<"Obsolete since the App Store no longer supports binaries with embedded bitcode">,
1212 Flags<[HelpHidden]>,
1213 Group<grp_obsolete>;
1214 def bitcode_process_mode : Separate<["-"], "bitcode_process_mode">,
1215 HelpText<"Obsolete since the App Store no longer supports binaries with embedded bitcode">,
1216 Flags<[HelpHidden]>,
1217 Group<grp_obsolete>;
1218 def bitcode_verify : Flag<["-"], "bitcode_verify">,
1219 HelpText<"Obsolete since the App Store no longer supports binaries with embedded bitcode">,
1220 Flags<[HelpHidden]>,
1221 Group<grp_obsolete>;
1223 def grp_undocumented : OptionGroup<"undocumented">, HelpText<"UNDOCUMENTED">;
1225 def add_linker_option : Flag<["-"], "add_linker_option">,
1226 HelpText<"This option is undocumented in ld64">,
1227 Flags<[HelpHidden]>,
1228 Group<grp_undocumented>;
1229 def add_source_version : Flag<["-"], "add_source_version">,
1230 HelpText<"This option is undocumented in ld64">,
1231 Flags<[HelpHidden]>,
1232 Group<grp_undocumented>;
1233 def no_source_version : Flag<["-"], "no_source_version">,
1234 HelpText<"This option is undocumented in ld64">,
1235 Flags<[HelpHidden]>,
1236 Group<grp_undocumented>;
1237 def add_split_seg_info : Flag<["-"], "add_split_seg_info">,
1238 HelpText<"This option is undocumented in ld64">,
1239 Flags<[HelpHidden]>,
1240 Group<grp_undocumented>;
1241 def allow_dead_duplicates : Flag<["-"], "allow_dead_duplicates">,
1242 HelpText<"This option is undocumented in ld64">,
1243 Flags<[HelpHidden]>,
1244 Group<grp_undocumented>;
1245 def allow_simulator_linking_to_macosx_dylibs : Flag<["-"], "allow_simulator_linking_to_macosx_dylibs">,
1246 HelpText<"This option is undocumented in ld64">,
1247 Flags<[HelpHidden]>,
1248 Group<grp_undocumented>;
1249 def classic_linker : Flag<["-"], "classic_linker">,
1250 HelpText<"This option is undocumented in ld64">,
1251 Flags<[HelpHidden]>,
1252 Group<grp_undocumented>;
1253 def data_in_code_info : Flag<["-"], "data_in_code_info">,
1254 HelpText<"Emit data-in-code information (default)">,
1255 Group<grp_undocumented>;
1256 def no_data_in_code_info : Flag<["-"], "no_data_in_code_info">,
1257 HelpText<"Do not emit data-in-code information">,
1258 Group<grp_undocumented>;
1259 def debug_snapshot : Flag<["-"], "debug_snapshot">,
1260 HelpText<"This option is undocumented in ld64">,
1261 Flags<[HelpHidden]>,
1262 Group<grp_undocumented>;
1263 def demangle : Flag<["-"], "demangle">,
1264 HelpText<"Demangle symbol names in diagnostics">;
1265 def encryptable : Flag<["-"], "encryptable">,
1266 HelpText<"Generate the LC_ENCRYPTION_INFO load command">,
1267 Group<grp_undocumented>;
1268 def no_encryption : Flag<["-"], "no_encryption">,
1269 HelpText<"Do not generate the LC_ENCRYPTION_INFO load command">,
1270 Group<grp_undocumented>;
1271 def executable_path : Flag<["-"], "executable_path">,
1272 HelpText<"This option is undocumented in ld64">,
1273 Flags<[HelpHidden]>,
1274 Group<grp_undocumented>;
1275 def fixup_chains : Flag<["-"], "fixup_chains">,
1276 HelpText<"Emit chained fixups">,
1277 Group<grp_undocumented>;
1278 def no_fixup_chains : Flag<["-"], "no_fixup_chains">,
1279 HelpText<"Emit fixup information as classic dyld opcodes">,
1280 Group<grp_undocumented>;
1281 def fixup_chains_section : Flag<["-"], "fixup_chains_section">,
1282 HelpText<"This option is undocumented in ld64">,
1283 Flags<[HelpHidden]>,
1284 Group<grp_undocumented>;
1285 def flto_codegen_only : Flag<["-"], "flto-codegen-only">,
1286 HelpText<"This option is undocumented in ld64">,
1287 Flags<[HelpHidden]>,
1288 Group<grp_undocumented>;
1289 def force_symbol_not_weak : Flag<["-"], "force_symbol_not_weak">,
1290 HelpText<"This option is undocumented in ld64">,
1291 Flags<[HelpHidden]>,
1292 Group<grp_undocumented>;
1293 def force_symbols_coalesce_list : Flag<["-"], "force_symbols_coalesce_list">,
1294 HelpText<"This option is undocumented in ld64">,
1295 Flags<[HelpHidden]>,
1296 Group<grp_undocumented>;
1297 def force_symbols_not_weak_list : Separate<["-"], "force_symbols_not_weak_list">,
1298 HelpText<"This option is undocumented in ld64">,
1299 Flags<[HelpHidden]>,
1300 Group<grp_undocumented>;
1301 def force_symbols_weak_list : Separate<["-"], "force_symbols_weak_list">,
1302 HelpText<"This option is undocumented in ld64">,
1303 Flags<[HelpHidden]>,
1304 Group<grp_undocumented>;
1305 def force_symbol_weak : Flag<["-"], "force_symbol_weak">,
1306 HelpText<"This option is undocumented in ld64">,
1307 Flags<[HelpHidden]>,
1308 Group<grp_undocumented>;
1309 def function_starts : Flag<["-"], "function_starts">,
1310 HelpText<"Create table of function start addresses (default)">,
1311 Group<grp_undocumented>;
1312 def i : Flag<["-"], "i">,
1313 HelpText<"This option is undocumented in ld64">,
1314 Flags<[HelpHidden]>,
1315 Group<grp_undocumented>;
1316 def ignore_optimization_hints : Flag<["-"], "ignore_optimization_hints">,
1317 HelpText<"Ignore Linker Optimization Hints">,
1318 Group<grp_undocumented>;
1319 def init_offsets : Flag<["-"], "init_offsets">,
1320 HelpText<"Store __TEXT segment offsets of static initializers">,
1321 Group<grp_undocumented>;
1322 def keep_dwarf_unwind : Flag<["-"], "keep_dwarf_unwind">,
1323 HelpText<"This option is undocumented in ld64">,
1324 Flags<[HelpHidden]>,
1325 Group<grp_undocumented>;
1326 def no_keep_dwarf_unwind : Flag<["-"], "no_keep_dwarf_unwind">,
1327 HelpText<"This option is undocumented in ld64">,
1328 Flags<[HelpHidden]>,
1329 Group<grp_undocumented>;
1330 def kext : Flag<["-"], "kext">,
1331 HelpText<"This option is undocumented in ld64">,
1332 Flags<[HelpHidden]>,
1333 Group<grp_undocumented>;
1334 def kext_objects_dir : Flag<["-"], "kext_objects_dir">,
1335 HelpText<"This option is undocumented in ld64">,
1336 Flags<[HelpHidden]>,
1337 Group<grp_undocumented>;
1338 def no_kext_objects : Flag<["-"], "no_kext_objects">,
1339 HelpText<"This option is undocumented in ld64">,
1340 Flags<[HelpHidden]>,
1341 Group<grp_undocumented>;
1342 def kexts_use_stubs : Flag<["-"], "kexts_use_stubs">,
1343 HelpText<"This option is undocumented in ld64">,
1344 Flags<[HelpHidden]>,
1345 Group<grp_undocumented>;
1346 def no_compact_unwind : Flag<["-"], "no_compact_unwind">,
1347 HelpText<"This option is undocumented in ld64">,
1348 Flags<[HelpHidden]>,
1349 Group<grp_undocumented>;
1350 def no_new_main : Flag<["-"], "no_new_main">,
1351 HelpText<"This option is undocumented in ld64">,
1352 Flags<[HelpHidden]>,
1353 Group<grp_undocumented>;
1354 def pause : Flag<["-"], "pause">,
1355 HelpText<"This option is undocumented in ld64">,
1356 Flags<[HelpHidden]>,
1357 Group<grp_undocumented>;
1358 def random_uuid : Flag<["-"], "random_uuid">,
1359 HelpText<"This option is undocumented in ld64">,
1360 Flags<[HelpHidden]>,
1361 Group<grp_undocumented>;
1362 def simulator_support : Flag<["-"], "simulator_support">,
1363 HelpText<"This option is undocumented in ld64">,
1364 Flags<[HelpHidden]>,
1365 Group<grp_undocumented>;
1366 def snapshot_dir : Flag<["-"], "snapshot_dir">,
1367 HelpText<"This option is undocumented in ld64">,
1368 Flags<[HelpHidden]>,
1369 Group<grp_undocumented>;
1370 def source_version : Flag<["-"], "source_version">,
1371 HelpText<"This option is undocumented in ld64">,
1372 Flags<[HelpHidden]>,
1373 Group<grp_undocumented>;
1374 def threaded_starts_section : Flag<["-"], "threaded_starts_section">,
1375 HelpText<"This option is undocumented in ld64">,
1376 Flags<[HelpHidden]>,
1377 Group<grp_undocumented>;
1378 def verbose_optimization_hints : Flag<["-"], "verbose_optimization_hints">,
1379 HelpText<"This option is undocumented in ld64">,
1380 Flags<[HelpHidden]>,
1381 Group<grp_undocumented>;
1382 def version_load_command : Flag<["-"], "version_load_command">,
1383 HelpText<"This option is undocumented in ld64">,
1384 Flags<[HelpHidden]>,
1385 Group<grp_undocumented>;
1387 def grp_ignored : OptionGroup<"ignored">, HelpText<"IGNORED">;
1389 def M : Flag<["-"], "M">,
1390 HelpText<"This option is ignored in ld64">,
1391 Flags<[HelpHidden]>,
1393 def new_linker : Flag<["-"], "new_linker">,
1394 HelpText<"This option is ignored in ld64">,
1395 Flags<[HelpHidden]>,
1398 def grp_ignored_silently : OptionGroup<"ignored_silently">, HelpText<"IGNORED SILENTLY">;
1400 def objc_abi_version : Separate<["-"], "objc_abi_version">,
1401 HelpText<"This option only applies to i386 in ld64">,
1402 Flags<[HelpHidden]>,
1403 Group<grp_ignored_silently>;
1404 def debug_variant : Flag<["-"], "debug_variant">,
1405 HelpText<"Do not warn about issues that are only problems for binaries shipping to customers.">,
1406 Flags<[HelpHidden]>,
1407 Group<grp_ignored_silently>;