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