]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/llvm-objcopy/StripOpts.td
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / llvm-objcopy / StripOpts.td
1 include "llvm/Option/OptParser.td"
2
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>;
8 }
9
10 def help : Flag<["-", "--"], "help">;
11
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">;
19
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">;
27
28 defm output : Eq<"o", "Write output to <file>">, MetaVarName<"output">;
29
30 def preserve_dates : Flag<["-", "--"], "preserve-dates">,
31                      HelpText<"Preserve access and modification timestamps">;
32 def p : Flag<["-"], "p">, Alias<preserve_dates>;
33
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>;
39
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">;
49
50 defm remove_section : Eq<"remove-section", "Remove <section>">,
51                       MetaVarName<"section">;
52 def R : JoinedOrSeparate<["-"], "R">, Alias<remove_section>;
53
54 defm keep_section : Eq<"keep-section", "Keep <section>">,
55                     MetaVarName<"section">;
56 defm keep_symbol : Eq<"keep-symbol", "Do not remove symbol <symbol>">,
57                    MetaVarName<"symbol">;
58 def K : JoinedOrSeparate<["-"], "K">, Alias<keep_symbol>;
59
60 def discard_all
61     : Flag<["-", "--"], "discard-all">,
62       HelpText<"Remove all local symbols except file and section symbols">;
63 def x : Flag<["-"], "x">, Alias<discard_all>;
64
65 def version : Flag<["-", "--"], "version">,
66               HelpText<"Print the version and exit.">;
67 def V : Flag<["-"], "V">, Alias<version>;