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 preserve_dates : Flag<[ "-", "--" ], "preserve-dates">,
15 HelpText<"Preserve access and modification timestamps">;
17 def p : Flag<[ "-" ], "p">, Alias<preserve_dates>;
19 def strip_all : Flag<["-", "--"], "strip-all">,
20 HelpText<"Remove non-allocated sections other than .gnu.warning* sections">;
22 def strip_debug : Flag<["-", "--"], "strip-debug">,
23 HelpText<"Remove debugging symbols only">;
25 def d : Flag<["-"], "d">,
28 def g : Flag<["-"], "g">,
31 def S : Flag<["-"], "S">,
34 defm remove_section : Eq<"remove-section">,
35 MetaVarName<"section">,
36 HelpText<"Remove <section>">;
38 def R : JoinedOrSeparate<["-"], "R">,
39 Alias<remove_section>;
41 defm keep_symbol : Eq<"keep-symbol">,
42 MetaVarName<"symbol">,
43 HelpText<"Do not remove symbol <symbol>">;
45 def K : JoinedOrSeparate<["-"], "K">,
48 def discard_all : Flag<["-", "--"], "discard-all">,
49 HelpText<"Remove all local symbols except file and section symbols">;
51 def version : Flag<[ "-", "--" ], "version">,
52 HelpText<"Print the version and exit.">;
54 def x : Flag<["-"], "x">,
57 def strip_unneeded : Flag<["-", "--"], "strip-unneeded">,
58 HelpText<"Remove all symbols not needed by relocations">;