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 keep_func_for_static: F<"keep-function-for-static">,
28 HelpText<"Make a static variable keep the enclosing function even if it would have been omitted otherwise.">,
31 def statistics: F<"statistics">,
32 HelpText<"Print statistics about the contribution of each object file to "
33 "the linked debug info. This prints a table after linking with the "
34 "object file name, the size of the debug info in the object file "
35 "(in bytes) and the size contributed (in bytes) to the linked dSYM. "
36 "The table is sorted by the output size listing the object files "
37 "with the largest contribution first.">,
40 def verify: F<"verify">,
41 HelpText<"Alias for --verify-dwarf=output">,
44 def verify_dwarf: Separate<["--", "-"], "verify-dwarf">,
45 MetaVarName<"<verification mode>">,
46 HelpText<"Run the DWARF verifier on the input and/or output. "
47 "Valid options are 'none, 'input', 'output', 'all' or 'auto' "
48 "which runs the output verifier only if input verification passed.">,
50 def: Joined<["--", "-"], "verify-dwarf=">, Alias<verify_dwarf>;
52 def no_output: F<"no-output">,
53 HelpText<"Do the link in memory, but do not emit the result file.">,
56 def no_swiftmodule_timestamp: F<"no-swiftmodule-timestamp">,
57 HelpText<"Don't check timestamp for swiftmodule files.">,
60 def no_odr: F<"no-odr">,
61 HelpText<"Do not use ODR (One Definition Rule) for type uniquing.">,
64 def dump_debug_map: F<"dump-debug-map">,
65 HelpText<"Parse and dump the debug map to standard output. No DWARF link will take place.">,
68 def yaml_input: Flag<["-", "--"], "y">,
69 HelpText<"Treat the input file is a YAML debug map rather than a binary.">,
72 def assembly: Flag<["-", "--"], "S">,
73 HelpText<"Output textual assembly instead of a binary dSYM companion file.">,
76 def symtab: F<"symtab">,
77 HelpText<"Dumps the symbol table found in executable or object file(s) and exits.">,
79 def: Flag<["-"], "s">,
81 HelpText<"Alias for --symtab">,
85 HelpText<"Produce a flat dSYM file (not a bundle).">,
87 def: Flag<["-"], "f">,
89 HelpText<"Alias for --flat">,
92 def fat64: F<"fat64">,
93 HelpText<"Use a 64-bit header when emitting universal binaries.">,
96 def update: F<"update">,
97 HelpText<"Updates existing dSYM files to contain the latest accelerator tables and other DWARF optimizations.">,
99 def: Flag<["-"], "u">,
101 HelpText<"Alias for --update">,
104 def output: Separate<["-", "--"], "o">,
105 MetaVarName<"<filename>">,
106 HelpText<"Specify the output file. Defaults to <input file>.dwarf">,
108 def: Separate<["--", "-"], "out">,
109 MetaVarName<"<filename>">,
111 HelpText<"Alias for -o">,
113 def: Joined<["--", "-"], "out=">, Alias<output>;
114 def: Joined<["-", "--"], "o=">, Alias<output>;
116 def oso_prepend_path: Separate<["--", "-"], "oso-prepend-path">,
117 MetaVarName<"<path>">,
118 HelpText<"Specify a directory to prepend to the paths of object files.">,
120 def: Joined<["--", "-"], "oso-prepend-path=">, Alias<oso_prepend_path>;
122 def object_prefix_map: Separate<["--", "-"], "object-prefix-map">,
123 MetaVarName<"<prefix=remapped>">,
124 HelpText<"Remap object file paths (but no source paths) before processing."
125 "Use this for Clang objects where the module cache location was"
126 "remapped using -fdebug-prefix-map; to help dsymutil"
127 "find the Clang module cache.">,
129 def: Joined<["--", "-"], "object-prefix-map=">, Alias<object_prefix_map>;
131 def symbolmap: Separate<["--", "-"], "symbol-map">,
132 MetaVarName<"<bcsymbolmap>">,
133 HelpText<"Updates the existing dSYMs inplace using symbol map specified.">,
135 def: Joined<["--", "-"], "symbol-map=">, Alias<symbolmap>;
137 def arch: Separate<["--", "-"], "arch">,
138 MetaVarName<"<arch>">,
139 HelpText<"Link DWARF debug information only for specified CPU architecture"
140 "types. This option can be specified multiple times, once for each"
141 "desired architecture. All CPU architectures will be linked by"
144 def: Joined<["--", "-"], "arch=">, Alias<arch>;
146 def accelerator: Separate<["--", "-"], "accelerator">,
147 MetaVarName<"<accelerator type>">,
148 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'">,
150 def: Joined<["--", "-"], "accelerator=">, Alias<accelerator>;
152 def toolchain: Separate<["--", "-"], "toolchain">,
153 MetaVarName<"<toolchain>">,
154 HelpText<"Embed toolchain information in dSYM bundle.">,
157 def threads: Separate<["--", "-"], "num-threads">,
158 MetaVarName<"<threads>">,
159 HelpText<"Specifies the maximum number of simultaneous threads to use when linking multiple architectures.">,
161 def: Separate<["-"], "j">,
162 MetaVarName<"<threads>">,
163 HelpText<"Alias for --num-threads">,
166 def reproducer: Separate<["--", "-"], "reproducer">,
167 MetaVarName<"<mode>">,
168 HelpText<"Specify the reproducer generation mode. Valid options are 'GenerateOnExit', 'GenerateOnCrash', 'Off'.">,
170 def: Joined<["--", "-"], "reproducer=">, Alias<reproducer>;
172 def gen_reproducer: F<"gen-reproducer">,
173 HelpText<"Generate a reproducer consisting of the input object files. Alias for --reproducer=GenerateOnExit.">,
176 def use_reproducer: Separate<["--", "-"], "use-reproducer">,
177 MetaVarName<"<path>">,
178 HelpText<"Use the object files from the given reproducer path.">,
180 def: Joined<["--", "-"], "use-reproducer=">, Alias<use_reproducer>;
182 def remarks_prepend_path: Separate<["--", "-"], "remarks-prepend-path">,
183 MetaVarName<"<path>">,
184 HelpText<"Specify a directory to prepend to the paths of the external remark files.">,
186 def: Joined<["--", "-"], "remarks-prepend-path=">, Alias<remarks_prepend_path>;
188 def remarks_output_format: Separate<["--", "-"], "remarks-output-format">,
189 MetaVarName<"<format>">,
190 HelpText<"Specify the format to be used when serializing the linked remarks.">,
192 def: Joined<["--", "-"], "remarks-output-format=">, Alias<remarks_output_format>;
194 def remarks_drop_without_debug: Flag<["--", "-"], "remarks-drop-without-debug">,
195 HelpText<"Drop remarks without valid debug locations. Without this flags, "
196 "all remarks are kept.">,
199 def linker: Separate<["--", "-"], "linker">,
200 MetaVarName<"<DWARF linker type>">,
201 HelpText<"Specify the desired type of DWARF linker. Defaults to 'apple'">,
203 def: Joined<["--", "-"], "linker=">, Alias<linker>;
205 def build_variant_suffix: Separate<["--", "-"], "build-variant-suffix">,
206 MetaVarName<"<suffix=buildvariant>">,
207 HelpText<"Specify the build variant suffix used to build the executabe file.">,
209 def: Joined<["--", "-"], "build-variant-suffix=">, Alias<build_variant_suffix>;
211 def dsym_search_path: Separate<["-", "--"], "D">,
212 MetaVarName<"<path>">,
213 HelpText<"Specify a directory that contain dSYM files to search for.">,