1 include "llvm/Option/OptParser.td"
3 class F<string name>: Flag<["--", "-"], name>;
5 def grp_general : OptionGroup<"Dsymutil">, HelpText<"Dsymutil Options">;
8 HelpText<"Prints this help output.">,
10 def: Flag<["-"], "h">,
12 HelpText<"Alias for --help">,
15 def version: F<"version">,
16 HelpText<"Prints the dsymutil version.">,
18 def: Flag<["-"], "v">,
20 HelpText<"Alias for --version">,
23 def verbose: F<"verbose">,
24 HelpText<"Enable verbose mode.">,
27 def quiet: F<"quiet">,
28 HelpText<"Enable quiet mode.">,
30 def: Flag<["-"], "q">,
32 HelpText<"Alias for --quiet">,
35 def keep_func_for_static: F<"keep-function-for-static">,
36 HelpText<"Make a static variable keep the enclosing function even if it would have been omitted otherwise.">,
39 def statistics: F<"statistics">,
40 HelpText<"Print statistics about the contribution of each object file to "
41 "the linked debug info. This prints a table after linking with the "
42 "object file name, the size of the debug info in the object file "
43 "(in bytes) and the size contributed (in bytes) to the linked dSYM. "
44 "The table is sorted by the output size listing the object files "
45 "with the largest contribution first.">,
48 def verify: F<"verify">,
49 HelpText<"Alias for --verify-dwarf=output">,
52 def verify_dwarf: Separate<["--", "-"], "verify-dwarf">,
53 MetaVarName<"<verification mode>">,
54 HelpText<"Run the DWARF verifier on the input and/or output. "
55 "Valid options are 'none, 'input', 'output', 'all' or 'auto' "
56 "which runs the output verifier only if input verification passed.">,
58 def: Joined<["--", "-"], "verify-dwarf=">, Alias<verify_dwarf>;
60 def no_output: F<"no-output">,
61 HelpText<"Do the link in memory, but do not emit the result file.">,
64 def no_swiftmodule_timestamp: F<"no-swiftmodule-timestamp">,
65 HelpText<"Don't check timestamp for swiftmodule files.">,
68 def no_object_timestamp: F<"no-object-timestamp">,
69 HelpText<"Don't check timestamp for object files.">,
72 def no_odr: F<"no-odr">,
73 HelpText<"Do not use ODR (One Definition Rule) for type uniquing.">,
76 def dump_debug_map: F<"dump-debug-map">,
77 HelpText<"Parse and dump the debug map to standard output. No DWARF link will take place.">,
80 def yaml_input: Flag<["-", "--"], "y">,
81 HelpText<"Treat the input file is a YAML debug map rather than a binary.">,
84 def assembly: Flag<["-", "--"], "S">,
85 HelpText<"Output textual assembly instead of a binary dSYM companion file.">,
88 def symtab: F<"symtab">,
89 HelpText<"Dumps the symbol table found in executable or object file(s) and exits.">,
91 def: Flag<["-"], "s">,
93 HelpText<"Alias for --symtab">,
97 HelpText<"Produce a flat dSYM file (not a bundle).">,
99 def: Flag<["-"], "f">,
101 HelpText<"Alias for --flat">,
104 def fat64: F<"fat64">,
105 HelpText<"Use a 64-bit header when emitting universal binaries.">,
108 def update: F<"update">,
109 HelpText<"Updates existing dSYM files to contain the latest accelerator tables and other DWARF optimizations.">,
111 def: Flag<["-"], "u">,
113 HelpText<"Alias for --update">,
116 def output: Separate<["-", "--"], "o">,
117 MetaVarName<"<filename>">,
118 HelpText<"Specify the output file. Defaults to <input file>.dwarf">,
120 def: Separate<["--", "-"], "out">,
121 MetaVarName<"<filename>">,
123 HelpText<"Alias for -o">,
125 def: Joined<["--", "-"], "out=">, Alias<output>;
126 def: Joined<["-", "--"], "o=">, Alias<output>;
128 def oso_prepend_path: Separate<["--", "-"], "oso-prepend-path">,
129 MetaVarName<"<path>">,
130 HelpText<"Specify a directory to prepend to the paths of object files.">,
132 def: Joined<["--", "-"], "oso-prepend-path=">, Alias<oso_prepend_path>;
134 def object_prefix_map: Separate<["--", "-"], "object-prefix-map">,
135 MetaVarName<"<prefix=remapped>">,
136 HelpText<"Remap object file paths (but no source paths) before processing. "
137 "Use this for Clang objects where the module cache location was "
138 "remapped using -fdebug-prefix-map; to help dsymutil "
139 "find the Clang module cache.">,
141 def: Joined<["--", "-"], "object-prefix-map=">, Alias<object_prefix_map>;
143 def arch: Separate<["--", "-"], "arch">,
144 MetaVarName<"<arch>">,
145 HelpText<"Link DWARF debug information only for specified CPU architecture "
146 "types. This option can be specified multiple times, once for each "
147 "desired architecture. All CPU architectures will be linked by "
150 def: Joined<["--", "-"], "arch=">, Alias<arch>;
152 def accelerator: Separate<["--", "-"], "accelerator">,
153 MetaVarName<"<accelerator type>">,
154 HelpText<"Specify the desired type of accelerator table. Valid options are 'Apple' (.apple_names, .apple_namespaces, .apple_types, .apple_objc), 'Dwarf' (.debug_names), 'Pub' (.debug_pubnames, .debug_pubtypes), 'Default' and 'None'">,
156 def: Joined<["--", "-"], "accelerator=">, Alias<accelerator>;
158 def toolchain: Separate<["--", "-"], "toolchain">,
159 MetaVarName<"<toolchain>">,
160 HelpText<"Embed toolchain information in dSYM bundle.">,
163 def threads: Separate<["--", "-"], "num-threads">,
164 MetaVarName<"<threads>">,
165 HelpText<"Specifies the maximum number of simultaneous threads to use when linking multiple architectures.">,
167 def: Separate<["-"], "j">,
168 MetaVarName<"<threads>">,
169 HelpText<"Alias for --num-threads">,
172 def reproducer: Separate<["--", "-"], "reproducer">,
173 MetaVarName<"<mode>">,
174 HelpText<"Specify the reproducer generation mode. Valid options are 'GenerateOnExit', 'GenerateOnCrash', 'Off'.">,
176 def: Joined<["--", "-"], "reproducer=">, Alias<reproducer>;
178 def gen_reproducer: F<"gen-reproducer">,
179 HelpText<"Generate a reproducer consisting of the input object files. Alias for --reproducer=GenerateOnExit.">,
182 def use_reproducer: Separate<["--", "-"], "use-reproducer">,
183 MetaVarName<"<path>">,
184 HelpText<"Use the object files from the given reproducer path.">,
186 def: Joined<["--", "-"], "use-reproducer=">, Alias<use_reproducer>;
188 def remarks_prepend_path: Separate<["--", "-"], "remarks-prepend-path">,
189 MetaVarName<"<path>">,
190 HelpText<"Specify a directory to prepend to the paths of the external remark files.">,
192 def: Joined<["--", "-"], "remarks-prepend-path=">, Alias<remarks_prepend_path>;
194 def remarks_output_format: Separate<["--", "-"], "remarks-output-format">,
195 MetaVarName<"<format>">,
196 HelpText<"Specify the format to be used when serializing the linked remarks.">,
198 def: Joined<["--", "-"], "remarks-output-format=">, Alias<remarks_output_format>;
200 def remarks_drop_without_debug: Flag<["--", "-"], "remarks-drop-without-debug">,
201 HelpText<"Drop remarks without valid debug locations. Without this flags, "
202 "all remarks are kept.">,
205 def linker: Separate<["--", "-"], "linker">,
206 MetaVarName<"<DWARF linker type>">,
207 HelpText<"Specify the desired type of DWARF linker. Defaults to 'classic'">,
209 def: Joined<["--", "-"], "linker=">, Alias<linker>;
211 def build_variant_suffix: Separate<["--", "-"], "build-variant-suffix">,
212 MetaVarName<"<suffix=buildvariant>">,
213 HelpText<"Specify the build variant suffix used to build the executable file.">,
215 def: Joined<["--", "-"], "build-variant-suffix=">, Alias<build_variant_suffix>;
217 def dsym_search_path: Separate<["-", "--"], "D">,
218 MetaVarName<"<path>">,
219 HelpText<"Specify a directory that contain dSYM files to search for.">,