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. Valid options are 'input', 'output', 'all' or 'none'.">,
48 def: Joined<["--", "-"], "verify-dwarf=">, Alias<verify_dwarf>;
50 def no_output: F<"no-output">,
51 HelpText<"Do the link in memory, but do not emit the result file.">,
54 def no_swiftmodule_timestamp: F<"no-swiftmodule-timestamp">,
55 HelpText<"Don't check timestamp for swiftmodule files.">,
58 def no_odr: F<"no-odr">,
59 HelpText<"Do not use ODR (One Definition Rule) for type uniquing.">,
62 def dump_debug_map: F<"dump-debug-map">,
63 HelpText<"Parse and dump the debug map to standard output. No DWARF link will take place.">,
66 def yaml_input: Flag<["-", "--"], "y">,
67 HelpText<"Treat the input file is a YAML debug map rather than a binary.">,
70 def papertrail: F<"papertrail">,
71 HelpText<"Embed warnings in the linked DWARF debug info.">,
74 def assembly: Flag<["-", "--"], "S">,
75 HelpText<"Output textual assembly instead of a binary dSYM companion file.">,
78 def symtab: F<"symtab">,
79 HelpText<"Dumps the symbol table found in executable or object file(s) and exits.">,
81 def: Flag<["-"], "s">,
83 HelpText<"Alias for --symtab">,
87 HelpText<"Produce a flat dSYM file (not a bundle).">,
89 def: Flag<["-"], "f">,
91 HelpText<"Alias for --flat">,
94 def update: F<"update">,
95 HelpText<"Updates existing dSYM files to contain the latest accelerator tables and other DWARF optimizations.">,
97 def: Flag<["-"], "u">,
99 HelpText<"Alias for --update">,
102 def output: Separate<["-", "--"], "o">,
103 MetaVarName<"<filename>">,
104 HelpText<"Specify the output file. Defaults to <input file>.dwarf">,
106 def: Separate<["--", "-"], "out">,
107 MetaVarName<"<filename>">,
109 HelpText<"Alias for -o">,
111 def: Joined<["--", "-"], "out=">, Alias<output>;
112 def: Joined<["-", "--"], "o=">, Alias<output>;
114 def oso_prepend_path: Separate<["--", "-"], "oso-prepend-path">,
115 MetaVarName<"<path>">,
116 HelpText<"Specify a directory to prepend to the paths of object files.">,
118 def: Joined<["--", "-"], "oso-prepend-path=">, Alias<oso_prepend_path>;
120 def object_prefix_map: Separate<["--", "-"], "object-prefix-map">,
121 MetaVarName<"<prefix=remapped>">,
122 HelpText<"Remap object file paths (but no source paths) before processing."
123 "Use this for Clang objects where the module cache location was"
124 "remapped using -fdebug-prefix-map; to help dsymutil"
125 "find the Clang module cache.">,
127 def: Joined<["--", "-"], "object-prefix-map=">, Alias<object_prefix_map>;
129 def symbolmap: Separate<["--", "-"], "symbol-map">,
130 MetaVarName<"<bcsymbolmap>">,
131 HelpText<"Updates the existing dSYMs inplace using symbol map specified.">,
133 def: Joined<["--", "-"], "symbol-map=">, Alias<symbolmap>;
135 def arch: Separate<["--", "-"], "arch">,
136 MetaVarName<"<arch>">,
137 HelpText<"Link DWARF debug information only for specified CPU architecture"
138 "types. This option can be specified multiple times, once for each"
139 "desired architecture. All CPU architectures will be linked by"
142 def: Joined<["--", "-"], "arch=">, Alias<arch>;
144 def accelerator: Separate<["--", "-"], "accelerator">,
145 MetaVarName<"<accelerator type>">,
146 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'">,
148 def: Joined<["--", "-"], "accelerator=">, Alias<accelerator>;
150 def toolchain: Separate<["--", "-"], "toolchain">,
151 MetaVarName<"<toolchain>">,
152 HelpText<"Embed toolchain information in dSYM bundle.">,
155 def threads: Separate<["--", "-"], "num-threads">,
156 MetaVarName<"<threads>">,
157 HelpText<"Specifies the maximum number of simultaneous threads to use when linking multiple architectures.">,
159 def: Separate<["-"], "j">,
160 MetaVarName<"<threads>">,
161 HelpText<"Alias for --num-threads">,
164 def reproducer: Separate<["--", "-"], "reproducer">,
165 MetaVarName<"<mode>">,
166 HelpText<"Specify the reproducer generation mode. Valid options are 'GenerateOnExit', 'GenerateOnCrash', 'Use', 'Off'.">,
168 def: Joined<["--", "-"], "reproducer=">, Alias<reproducer>;
170 def gen_reproducer: F<"gen-reproducer">,
171 HelpText<"Generate a reproducer consisting of the input object files. Alias for --reproducer=GenerateOnExit.">,
174 def use_reproducer: Separate<["--", "-"], "use-reproducer">,
175 MetaVarName<"<path>">,
176 HelpText<"Use the object files from the given reproducer path. Alias for --reproducer=Use.">,
178 def: Joined<["--", "-"], "use-reproducer=">, Alias<use_reproducer>;
180 def remarks_prepend_path: Separate<["--", "-"], "remarks-prepend-path">,
181 MetaVarName<"<path>">,
182 HelpText<"Specify a directory to prepend to the paths of the external remark files.">,
184 def: Joined<["--", "-"], "remarks-prepend-path=">, Alias<remarks_prepend_path>;
186 def remarks_output_format: Separate<["--", "-"], "remarks-output-format">,
187 MetaVarName<"<format>">,
188 HelpText<"Specify the format to be used when serializing the linked remarks.">,
190 def: Joined<["--", "-"], "remarks-output-format=">, Alias<remarks_output_format>;