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