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_odr: F<"no-odr">,
69 HelpText<"Do not use ODR (One Definition Rule) for type uniquing.">,
72 def dump_debug_map: F<"dump-debug-map">,
73 HelpText<"Parse and dump the debug map to standard output. No DWARF link will take place.">,
76 def yaml_input: Flag<["-", "--"], "y">,
77 HelpText<"Treat the input file is a YAML debug map rather than a binary.">,
80 def assembly: Flag<["-", "--"], "S">,
81 HelpText<"Output textual assembly instead of a binary dSYM companion file.">,
84 def symtab: F<"symtab">,
85 HelpText<"Dumps the symbol table found in executable or object file(s) and exits.">,
87 def: Flag<["-"], "s">,
89 HelpText<"Alias for --symtab">,
93 HelpText<"Produce a flat dSYM file (not a bundle).">,
95 def: Flag<["-"], "f">,
97 HelpText<"Alias for --flat">,
100 def fat64: F<"fat64">,
101 HelpText<"Use a 64-bit header when emitting universal binaries.">,
104 def update: F<"update">,
105 HelpText<"Updates existing dSYM files to contain the latest accelerator tables and other DWARF optimizations.">,
107 def: Flag<["-"], "u">,
109 HelpText<"Alias for --update">,
112 def output: Separate<["-", "--"], "o">,
113 MetaVarName<"<filename>">,
114 HelpText<"Specify the output file. Defaults to <input file>.dwarf">,
116 def: Separate<["--", "-"], "out">,
117 MetaVarName<"<filename>">,
119 HelpText<"Alias for -o">,
121 def: Joined<["--", "-"], "out=">, Alias<output>;
122 def: Joined<["-", "--"], "o=">, Alias<output>;
124 def oso_prepend_path: Separate<["--", "-"], "oso-prepend-path">,
125 MetaVarName<"<path>">,
126 HelpText<"Specify a directory to prepend to the paths of object files.">,
128 def: Joined<["--", "-"], "oso-prepend-path=">, Alias<oso_prepend_path>;
130 def object_prefix_map: Separate<["--", "-"], "object-prefix-map">,
131 MetaVarName<"<prefix=remapped>">,
132 HelpText<"Remap object file paths (but no source paths) before processing."
133 "Use this for Clang objects where the module cache location was"
134 "remapped using -fdebug-prefix-map; to help dsymutil"
135 "find the Clang module cache.">,
137 def: Joined<["--", "-"], "object-prefix-map=">, Alias<object_prefix_map>;
139 def arch: Separate<["--", "-"], "arch">,
140 MetaVarName<"<arch>">,
141 HelpText<"Link DWARF debug information only for specified CPU architecture"
142 "types. This option can be specified multiple times, once for each"
143 "desired architecture. All CPU architectures will be linked by"
146 def: Joined<["--", "-"], "arch=">, Alias<arch>;
148 def accelerator: Separate<["--", "-"], "accelerator">,
149 MetaVarName<"<accelerator type>">,
150 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'">,
152 def: Joined<["--", "-"], "accelerator=">, Alias<accelerator>;
154 def toolchain: Separate<["--", "-"], "toolchain">,
155 MetaVarName<"<toolchain>">,
156 HelpText<"Embed toolchain information in dSYM bundle.">,
159 def threads: Separate<["--", "-"], "num-threads">,
160 MetaVarName<"<threads>">,
161 HelpText<"Specifies the maximum number of simultaneous threads to use when linking multiple architectures.">,
163 def: Separate<["-"], "j">,
164 MetaVarName<"<threads>">,
165 HelpText<"Alias for --num-threads">,
168 def reproducer: Separate<["--", "-"], "reproducer">,
169 MetaVarName<"<mode>">,
170 HelpText<"Specify the reproducer generation mode. Valid options are 'GenerateOnExit', 'GenerateOnCrash', 'Off'.">,
172 def: Joined<["--", "-"], "reproducer=">, Alias<reproducer>;
174 def gen_reproducer: F<"gen-reproducer">,
175 HelpText<"Generate a reproducer consisting of the input object files. Alias for --reproducer=GenerateOnExit.">,
178 def use_reproducer: Separate<["--", "-"], "use-reproducer">,
179 MetaVarName<"<path>">,
180 HelpText<"Use the object files from the given reproducer path.">,
182 def: Joined<["--", "-"], "use-reproducer=">, Alias<use_reproducer>;
184 def remarks_prepend_path: Separate<["--", "-"], "remarks-prepend-path">,
185 MetaVarName<"<path>">,
186 HelpText<"Specify a directory to prepend to the paths of the external remark files.">,
188 def: Joined<["--", "-"], "remarks-prepend-path=">, Alias<remarks_prepend_path>;
190 def remarks_output_format: Separate<["--", "-"], "remarks-output-format">,
191 MetaVarName<"<format>">,
192 HelpText<"Specify the format to be used when serializing the linked remarks.">,
194 def: Joined<["--", "-"], "remarks-output-format=">, Alias<remarks_output_format>;
196 def remarks_drop_without_debug: Flag<["--", "-"], "remarks-drop-without-debug">,
197 HelpText<"Drop remarks without valid debug locations. Without this flags, "
198 "all remarks are kept.">,
201 def linker: Separate<["--", "-"], "linker">,
202 MetaVarName<"<DWARF linker type>">,
203 HelpText<"Specify the desired type of DWARF linker. Defaults to 'classic'">,
205 def: Joined<["--", "-"], "linker=">, Alias<linker>;
207 def build_variant_suffix: Separate<["--", "-"], "build-variant-suffix">,
208 MetaVarName<"<suffix=buildvariant>">,
209 HelpText<"Specify the build variant suffix used to build the executabe file.">,
211 def: Joined<["--", "-"], "build-variant-suffix=">, Alias<build_variant_suffix>;
213 def dsym_search_path: Separate<["-", "--"], "D">,
214 MetaVarName<"<path>">,
215 HelpText<"Specify a directory that contain dSYM files to search for.">,