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<"Run the DWARF verifier on the linked DWARF debug info.">,
44 def no_output: F<"no-output">,
45 HelpText<"Do the link in memory, but do not emit the result file.">,
48 def no_swiftmodule_timestamp: F<"no-swiftmodule-timestamp">,
49 HelpText<"Don't check timestamp for swiftmodule files.">,
52 def no_odr: F<"no-odr">,
53 HelpText<"Do not use ODR (One Definition Rule) for type uniquing.">,
56 def dump_debug_map: F<"dump-debug-map">,
57 HelpText<"Parse and dump the debug map to standard output. No DWARF link will take place.">,
60 def yaml_input: Flag<["-", "--"], "y">,
61 HelpText<"Treat the input file is a YAML debug map rather than a binary.">,
64 def papertrail: F<"papertrail">,
65 HelpText<"Embed warnings in the linked DWARF debug info.">,
68 def assembly: Flag<["-", "--"], "S">,
69 HelpText<"Output textual assembly instead of a binary dSYM companion file.">,
72 def symtab: F<"symtab">,
73 HelpText<"Dumps the symbol table found in executable or object file(s) and exits.">,
75 def: Flag<["-"], "s">,
77 HelpText<"Alias for --symtab">,
81 HelpText<"Produce a flat dSYM file (not a bundle).">,
83 def: Flag<["-"], "f">,
85 HelpText<"Alias for --flat">,
88 def update: F<"update">,
89 HelpText<"Updates existing dSYM files to contain the latest accelerator tables and other DWARF optimizations.">,
91 def: Flag<["-"], "u">,
93 HelpText<"Alias for --update">,
96 def output: Separate<["-", "--"], "o">,
97 MetaVarName<"<filename>">,
98 HelpText<"Specify the output file. Defaults to <input file>.dwarf">,
100 def: Separate<["--", "-"], "out">,
101 MetaVarName<"<filename>">,
103 HelpText<"Alias for -o">,
105 def: Joined<["--", "-"], "out=">, Alias<output>;
106 def: Joined<["-", "--"], "o=">, Alias<output>;
108 def oso_prepend_path: Separate<["--", "-"], "oso-prepend-path">,
109 MetaVarName<"<path>">,
110 HelpText<"Specify a directory to prepend to the paths of object files.">,
112 def: Joined<["--", "-"], "oso-prepend-path=">, Alias<oso_prepend_path>;
114 def object_prefix_map: Separate<["--", "-"], "object-prefix-map">,
115 MetaVarName<"<prefix=remapped>">,
116 HelpText<"Remap object file paths (but no source paths) before processing."
117 "Use this for Clang objects where the module cache location was"
118 "remapped using -fdebug-prefix-map; to help dsymutil"
119 "find the Clang module cache.">,
121 def: Joined<["--", "-"], "object-prefix-map=">, Alias<object_prefix_map>;
123 def symbolmap: Separate<["--", "-"], "symbol-map">,
124 MetaVarName<"<bcsymbolmap>">,
125 HelpText<"Updates the existing dSYMs inplace using symbol map specified.">,
127 def: Joined<["--", "-"], "symbol-map=">, Alias<symbolmap>;
129 def arch: Separate<["--", "-"], "arch">,
130 MetaVarName<"<arch>">,
131 HelpText<"Link DWARF debug information only for specified CPU architecture"
132 "types. This option can be specified multiple times, once for each"
133 "desired architecture. All CPU architectures will be linked by"
136 def: Joined<["--", "-"], "arch=">, Alias<arch>;
138 def accelerator: Separate<["--", "-"], "accelerator">,
139 MetaVarName<"<accelerator type>">,
140 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) and 'Default'">,
142 def: Joined<["--", "-"], "accelerator=">, Alias<accelerator>;
144 def toolchain: Separate<["--", "-"], "toolchain">,
145 MetaVarName<"<toolchain>">,
146 HelpText<"Embed toolchain information in dSYM bundle.">,
149 def threads: Separate<["--", "-"], "num-threads">,
150 MetaVarName<"<threads>">,
151 HelpText<"Specifies the maximum number of simultaneous threads to use when linking multiple architectures.">,
153 def: Separate<["-"], "j">,
154 MetaVarName<"<threads>">,
155 HelpText<"Alias for --num-threads">,
158 def gen_reproducer: F<"gen-reproducer">,
159 HelpText<"Generate a reproducer consisting of the input object files.">,
162 def use_reproducer: Separate<["--", "-"], "use-reproducer">,
163 MetaVarName<"<path>">,
164 HelpText<"Use the object files from the given reproducer path.">,
166 def: Joined<["--", "-"], "use-reproducer=">, Alias<use_reproducer>;
168 def remarks_prepend_path: Separate<["--", "-"], "remarks-prepend-path">,
169 MetaVarName<"<path>">,
170 HelpText<"Specify a directory to prepend to the paths of the external remark files.">,
172 def: Joined<["--", "-"], "remarks-prepend-path=">, Alias<remarks_prepend_path>;
174 def remarks_output_format: Separate<["--", "-"], "remarks-output-format">,
175 MetaVarName<"<format>">,
176 HelpText<"Specify the format to be used when serializing the linked remarks.">,
178 def: Joined<["--", "-"], "remarks-output-format=">, Alias<remarks_output_format>;