[ASan] Do not instrument other runtime functions with `__asan_handle_no_return`
[llvm-core.git] / tools / llvm-objcopy / StripOpts.td
blobb29f9ee6e1749fb8651c9d4ca9428dbf4e451e97
1 include "llvm/Option/OptParser.td"
3 multiclass Eq<string name, string help> {
4   def NAME : Separate<["--", "-"], name>;
5   def NAME #_eq : Joined<["--", "-"], name #"=">,
6                   Alias<!cast<Separate>(NAME)>,
7                   HelpText<help>;
10 def help : Flag<["-", "--"], "help">;
12 def enable_deterministic_archives
13     : Flag<["-", "--"], "enable-deterministic-archives">,
14       HelpText<"Enable deterministic mode when stripping archives (use zero "
15                "for UIDs, GIDs, and timestamps).">;
16 def D : Flag<["-"], "D">,
17         Alias<enable_deterministic_archives>,
18         HelpText<"Alias for --enable-deterministic-archives">;
20 def disable_deterministic_archives
21     : Flag<["-", "--"], "disable-deterministic-archives">,
22       HelpText<"Disable deterministic mode when stripping archives (use real "
23                "values for UIDs, GIDs, and timestamps).">;
24 def U : Flag<["-"], "U">,
25         Alias<disable_deterministic_archives>,
26         HelpText<"Alias for --disable-deterministic-archives">;
28 defm output : Eq<"o", "Write output to <file>">, MetaVarName<"output">;
30 def preserve_dates : Flag<["-", "--"], "preserve-dates">,
31                      HelpText<"Preserve access and modification timestamps">;
32 def p : Flag<["-"], "p">, Alias<preserve_dates>;
34 def strip_all
35     : Flag<["-", "--"], "strip-all">,
36       HelpText<
37           "Remove non-allocated sections other than .gnu.warning* sections">;
38 def s : Flag<["-"], "s">, Alias<strip_all>;
40 def strip_all_gnu : Flag<["-", "--"], "strip-all-gnu">,
41                     HelpText<"Compatible with GNU strip's --strip-all">;
42 def strip_debug : Flag<["-", "--"], "strip-debug">,
43                   HelpText<"Remove debugging symbols only">;
44 def d : Flag<["-"], "d">, Alias<strip_debug>;
45 def g : Flag<["-"], "g">, Alias<strip_debug>;
46 def S : Flag<["-"], "S">, Alias<strip_debug>;
47 def strip_unneeded : Flag<["-", "--"], "strip-unneeded">,
48                      HelpText<"Remove all symbols not needed by relocations">;
50 defm remove_section : Eq<"remove-section", "Remove <section>">,
51                       MetaVarName<"section">;
52 def R : JoinedOrSeparate<["-"], "R">, Alias<remove_section>;
54 defm strip_symbol : Eq<"strip-symbol", "Strip <symbol>">,
55                     MetaVarName<"symbol">;
56 def N : JoinedOrSeparate<["-"], "N">, Alias<strip_symbol>;
58 defm keep_section : Eq<"keep-section", "Keep <section>">,
59                     MetaVarName<"section">;
60 defm keep_symbol : Eq<"keep-symbol", "Do not remove symbol <symbol>">,
61                    MetaVarName<"symbol">;
62 def keep_file_symbols : Flag<["-", "--"], "keep-file-symbols">,
63                         HelpText<"Do not remove file symbols">;
65 def K : JoinedOrSeparate<["-"], "K">, Alias<keep_symbol>;
67 def discard_locals : Flag<["-", "--"], "discard-locals">,
68                      HelpText<"Remove compiler-generated local symbols, (e.g. "
69                               "symbols starting with .L)">;
70 def X : Flag<["-"], "X">, Alias<discard_locals>;
72 def discard_all
73     : Flag<["-", "--"], "discard-all">,
74       HelpText<"Remove all local symbols except file and section symbols">;
75 def x : Flag<["-"], "x">, Alias<discard_all>;
77 def version : Flag<["-", "--"], "version">,
78               HelpText<"Print the version and exit.">;
79 def V : Flag<["-"], "V">, Alias<version>;