xref: /llvm-project/llvm/tools/dsymutil/Options.td (revision 5886454669c3c9026f7f27eab13509dd0241f2d6)
1include "llvm/Option/OptParser.td"
2
3class F<string name>: Flag<["--", "-"], name>;
4
5def grp_general : OptionGroup<"Dsymutil">, HelpText<"Dsymutil Options">;
6
7def help: F<"help">,
8  HelpText<"Prints this help output.">,
9  Group<grp_general>;
10def: Flag<["-"], "h">,
11  Alias<help>,
12  HelpText<"Alias for --help">,
13  Group<grp_general>;
14
15def version: F<"version">,
16  HelpText<"Prints the dsymutil version.">,
17  Group<grp_general>;
18def: Flag<["-"], "v">,
19  Alias<version>,
20  HelpText<"Alias for --version">,
21  Group<grp_general>;
22
23def verbose: F<"verbose">,
24  HelpText<"Enable verbose mode.">,
25  Group<grp_general>;
26
27def quiet: F<"quiet">,
28  HelpText<"Enable quiet mode.">,
29  Group<grp_general>;
30def: Flag<["-"], "q">,
31  Alias<quiet>,
32  HelpText<"Alias for --quiet">,
33  Group<grp_general>;
34
35def 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.">,
37  Group<grp_general>;
38
39def 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.">,
46  Group<grp_general>;
47
48def verify: F<"verify">,
49  HelpText<"Alias for --verify-dwarf=output">,
50  Group<grp_general>;
51
52def 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.">,
57  Group<grp_general>;
58def: Joined<["--", "-"], "verify-dwarf=">, Alias<verify_dwarf>;
59
60def no_output: F<"no-output">,
61  HelpText<"Do the link in memory, but do not emit the result file.">,
62  Group<grp_general>;
63
64def no_swiftmodule_timestamp: F<"no-swiftmodule-timestamp">,
65  HelpText<"Don't check timestamp for swiftmodule files.">,
66  Group<grp_general>;
67
68def no_object_timestamp: F<"no-object-timestamp">,
69  HelpText<"Don't check timestamp for object files.">,
70  Group<grp_general>;
71
72def no_odr: F<"no-odr">,
73  HelpText<"Do not use ODR (One Definition Rule) for type uniquing.">,
74  Group<grp_general>;
75
76def dump_debug_map: F<"dump-debug-map">,
77  HelpText<"Parse and dump the debug map to standard output. No DWARF link will take place.">,
78  Group<grp_general>;
79
80def yaml_input: Flag<["-", "--"], "y">,
81  HelpText<"Treat the input file is a YAML debug map rather than a binary.">,
82  Group<grp_general>;
83
84def assembly: Flag<["-", "--"], "S">,
85  HelpText<"Output textual assembly instead of a binary dSYM companion file.">,
86  Group<grp_general>;
87
88def symtab: F<"symtab">,
89  HelpText<"Dumps the symbol table found in executable or object file(s) and exits.">,
90  Group<grp_general>;
91def: Flag<["-"], "s">,
92  Alias<symtab>,
93  HelpText<"Alias for --symtab">,
94  Group<grp_general>;
95
96def flat: F<"flat">,
97  HelpText<"Produce a flat dSYM file (not a bundle).">,
98  Group<grp_general>;
99def: Flag<["-"], "f">,
100  Alias<flat>,
101  HelpText<"Alias for --flat">,
102  Group<grp_general>;
103
104def fat64: F<"fat64">,
105  HelpText<"Use a 64-bit header when emitting universal binaries.">,
106  Group<grp_general>;
107
108def update: F<"update">,
109  HelpText<"Updates existing dSYM files to contain the latest accelerator tables and other DWARF optimizations.">,
110  Group<grp_general>;
111def: Flag<["-"], "u">,
112  Alias<update>,
113  HelpText<"Alias for --update">,
114  Group<grp_general>;
115
116def output: Separate<["-", "--"], "o">,
117  MetaVarName<"<filename>">,
118  HelpText<"Specify the output file. Defaults to <input file>.dwarf">,
119  Group<grp_general>;
120def: Separate<["--", "-"], "out">,
121  MetaVarName<"<filename>">,
122  Alias<output>,
123  HelpText<"Alias for -o">,
124  Group<grp_general>;
125def: Joined<["--", "-"], "out=">, Alias<output>;
126def: Joined<["-", "--"], "o=">, Alias<output>;
127
128def oso_prepend_path: Separate<["--", "-"], "oso-prepend-path">,
129  MetaVarName<"<path>">,
130  HelpText<"Specify a directory to prepend to the paths of object files.">,
131  Group<grp_general>;
132def: Joined<["--", "-"], "oso-prepend-path=">, Alias<oso_prepend_path>;
133
134def 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.">,
140    Group<grp_general>;
141def: Joined<["--", "-"], "object-prefix-map=">, Alias<object_prefix_map>;
142
143def 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 "
148           "default.">,
149  Group<grp_general>;
150def: Joined<["--", "-"], "arch=">, Alias<arch>;
151
152def 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'">,
155  Group<grp_general>;
156def: Joined<["--", "-"], "accelerator=">, Alias<accelerator>;
157
158def toolchain: Separate<["--", "-"], "toolchain">,
159  MetaVarName<"<toolchain>">,
160  HelpText<"Embed toolchain information in dSYM bundle.">,
161  Group<grp_general>;
162
163def threads: Separate<["--", "-"], "num-threads">,
164  MetaVarName<"<threads>">,
165  HelpText<"Specifies the maximum number of simultaneous threads to use when linking multiple architectures.">,
166  Group<grp_general>;
167def: Separate<["-"], "j">,
168  MetaVarName<"<threads>">,
169  HelpText<"Alias for --num-threads">,
170  Group<grp_general>;
171
172def reproducer: Separate<["--", "-"], "reproducer">,
173  MetaVarName<"<mode>">,
174  HelpText<"Specify the reproducer generation mode. Valid options are 'GenerateOnExit', 'GenerateOnCrash', 'Off'.">,
175  Group<grp_general>;
176def: Joined<["--", "-"], "reproducer=">, Alias<reproducer>;
177
178def gen_reproducer: F<"gen-reproducer">,
179  HelpText<"Generate a reproducer consisting of the input object files. Alias for --reproducer=GenerateOnExit.">,
180  Group<grp_general>;
181
182def use_reproducer: Separate<["--", "-"], "use-reproducer">,
183  MetaVarName<"<path>">,
184  HelpText<"Use the object files from the given reproducer path.">,
185  Group<grp_general>;
186def: Joined<["--", "-"], "use-reproducer=">, Alias<use_reproducer>;
187
188def 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.">,
191  Group<grp_general>;
192def: Joined<["--", "-"], "remarks-prepend-path=">, Alias<remarks_prepend_path>;
193
194def remarks_output_format: Separate<["--", "-"], "remarks-output-format">,
195  MetaVarName<"<format>">,
196  HelpText<"Specify the format to be used when serializing the linked remarks.">,
197  Group<grp_general>;
198def: Joined<["--", "-"], "remarks-output-format=">, Alias<remarks_output_format>;
199
200def 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.">,
203  Group<grp_general>;
204
205def linker: Separate<["--", "-"], "linker">,
206  MetaVarName<"<DWARF linker type>">,
207  HelpText<"Specify the desired type of DWARF linker. Defaults to 'classic'">,
208  Group<grp_general>;
209def: Joined<["--", "-"], "linker=">, Alias<linker>;
210
211def build_variant_suffix: Separate<["--", "-"], "build-variant-suffix">,
212  MetaVarName<"<suffix=buildvariant>">,
213  HelpText<"Specify the build variant suffix used to build the executable file.">,
214  Group<grp_general>;
215def: Joined<["--", "-"], "build-variant-suffix=">, Alias<build_variant_suffix>;
216
217def dsym_search_path: Separate<["-", "--"], "D">,
218  MetaVarName<"<path>">,
219  HelpText<"Specify a directory that contain dSYM files to search for.">,
220  Group<grp_general>;
221