-
Notifications
You must be signed in to change notification settings - Fork 10.7k
/
Opts.td
69 lines (67 loc) · 3.42 KB
/
Opts.td
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
include "llvm/Option/OptParser.td"
multiclass Eq<string name> {
def NAME: Separate<["--", "-"], name>;
def NAME # _eq: Joined<["--", "-"], name # "=">, Alias<!cast<Separate>(NAME)>;
}
def help : Flag<["-", "--"], "help">;
defm binary_architecture : Eq<"binary-architecture">,
HelpText<"Used when transforming an architecture-less format (such as binary) to another format">;
def B : JoinedOrSeparate<["-"], "B">,
Alias<binary_architecture>;
defm input_target : Eq<"input-target">,
HelpText<"Format of the input file">,
Values<"binary">;
defm output_target : Eq<"output-target">,
HelpText<"Format of the output file">,
Values<"binary">;
def O : JoinedOrSeparate<["-"], "O">,
Alias<output_target>;
defm split_dwo : Eq<"split-dwo">,
MetaVarName<"dwo-file">,
HelpText<"Equivalent to extract-dwo on the input file to <dwo-file>, then strip-dwo on the input file">;
defm add_gnu_debuglink : Eq<"add-gnu-debuglink">,
MetaVarName<"debug-file">,
HelpText<"Add a .gnu_debuglink for <debug-file>">;
defm remove_section : Eq<"remove-section">,
MetaVarName<"section">,
HelpText<"Remove <section>">;
defm redefine_symbol : Eq<"redefine-sym">,
MetaVarName<"old=new">,
HelpText<"Change the name of a symbol old to new">;
def R : JoinedOrSeparate<["-"], "R">,
Alias<remove_section>;
defm keep : Eq<"keep">,
MetaVarName<"section">,
HelpText<"Keep <section>">;
defm only_keep : Eq<"only-keep">,
MetaVarName<"section">,
HelpText<"Remove all but <section>">;
def j : JoinedOrSeparate<["-"], "j">,
Alias<only_keep>;
defm add_section : Eq<"add-section">,
MetaVarName<"section=file">,
HelpText<"Make a section named <section> with the contents of <file>.">;
def strip_all : Flag<["-", "--"], "strip-all">,
HelpText<"Remove non-allocated sections other than .gnu.warning* sections">;
def strip_all_gnu : Flag<["-", "--"], "strip-all-gnu">,
HelpText<"Compaitable with GNU objcopy's --strip-all">;
def strip_debug : Flag<["-", "--"], "strip-debug">,
HelpText<"Remove all debug information">;
def strip_dwo : Flag<["-", "--"], "strip-dwo">,
HelpText<"Remove all DWARF .dwo sections from file">;
def strip_sections : Flag<["-", "--"], "strip-sections">,
HelpText<"Remove all section headers">;
def strip_non_alloc : Flag<["-", "--"], "strip-non-alloc">,
HelpText<"Remove all non-allocated sections">;
def extract_dwo : Flag<["-", "--"], "extract-dwo">,
HelpText<"Remove all sections that are not DWARF .dwo sections from file">;
def localize_hidden : Flag<["-", "--"], "localize-hidden">,
HelpText<"Mark all symbols that have hidden or internal visibility as local">;
defm localize_symbol : Eq<"localize-symbol">,
MetaVarName<"symbol">,
HelpText<"Mark <symbol> as local">;
def L : JoinedOrSeparate<["-"], "L">,
Alias<localize_symbol>;
defm globalize_symbol : Eq<"globalize-symbol">,
MetaVarName<"symbol">,
HelpText<"Mark <symbol> as global">;