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