1 include "llvm/Option/OptParser.td"
3 multiclass Eq<string name> {
4 def NAME: Separate<["--", "-"], name>;
5 def NAME # _eq: Joined<["--", "-"], name # "=">, Alias<!cast<Separate>(NAME)>;
8 def help : Flag<["-", "--"], "help">;
10 defm output : Eq<"o">,
11 MetaVarName<"output">,
12 HelpText<"Write output to <file>">;
14 def strip_all : Flag<["-", "--"], "strip-all">,
15 HelpText<"Remove non-allocated sections other than .gnu.warning* sections">;
17 def strip_debug : Flag<["-", "--"], "strip-debug">,
18 HelpText<"Remove debugging symbols only">;
20 def d : Flag<["-"], "d">,
23 def g : Flag<["-"], "g">,
26 def S : Flag<["-"], "S">,
29 defm remove_section : Eq<"remove-section">,
30 MetaVarName<"section">,
31 HelpText<"Remove <section>">;
33 def R : JoinedOrSeparate<["-"], "R">,
34 Alias<remove_section>;
36 defm keep_symbol : Eq<"keep-symbol">,
37 MetaVarName<"symbol">,
38 HelpText<"Do not remove symbol <symbol>">;
40 def K : JoinedOrSeparate<["-"], "K">,
43 def discard_all : Flag<["-", "--"], "discard-all">,
44 HelpText<"Remove all local symbols except file and section symbols">;
45 def x : Flag<["-"], "x">,
48 def strip_unneeded : Flag<["-", "--"], "strip-unneeded">,
49 HelpText<"Remove all symbols not needed by relocations">;