2019-08-15 06:45:41 +02:00
|
|
|
include "CommonOpts.td"
|
2018-05-07 21:32:09 +02:00
|
|
|
|
2019-08-15 06:45:41 +02:00
|
|
|
def output : JoinedOrSeparate<["-"], "o">, HelpText<"Write output to <file>">,
|
|
|
|
MetaVarName<"<file>">;
|
2018-05-07 21:32:09 +02:00
|
|
|
|
2019-08-15 06:45:41 +02:00
|
|
|
def s : Flag<["-"], "s">,
|
|
|
|
Alias<strip_all>,
|
|
|
|
HelpText<"Alias for --strip-all">;
|
2019-05-02 13:53:02 +02:00
|
|
|
def no_strip_all : Flag<["--"], "no-strip-all">,
|
|
|
|
HelpText<"Disable --strip-all">;
|
[llvm-strip] Support -s alias for --strip-all. Make both strip and objcopy case sensitive to support both -s (--strip-all) and -S (--strip-debug).
Summary:
GNU strip supports both `-s` and `-S` as aliases for `--strip-all` and `--strip-debug`, respectfully.
As part of this, it turns out that strip/objcopy were accepting case insensitive command line args. I'm not sure if there was an explicit reason for this. The only others uses of this are llvm-cvtres/llvm-mt/llvm-lib, which are all tools specific for windows support. Forcing case sensitivity allows both aliases to exist, but seems like a good idea anyway.
And as a surprise test case adjustment, the llvm-strip unit test was running with `-keep=unavailable_symbol`, despite `keep` not be a valid flag for strip. This is because there is a flag `-K` which, when case insensitivity is permitted, allows it to be interpreted as `-K` = `eep=unavailable_symbol` (e.g. to allow `-Kfoo` == `--keep-symbol=foo`).
Reviewers: jakehehrlich, jhenderson, alexshap
Reviewed By: jakehehrlich
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D53163
llvm-svn: 345068
2018-10-23 20:46:33 +02:00
|
|
|
|
2019-08-15 06:45:41 +02:00
|
|
|
def d : Flag<["-"], "d">,
|
|
|
|
Alias<strip_debug>,
|
|
|
|
HelpText<"Alias for --strip-debug">;
|
|
|
|
def S : Flag<["-"], "S">,
|
|
|
|
Alias<strip_debug>,
|
|
|
|
HelpText<"Alias for --strip-debug">;
|
2020-05-27 01:49:56 +02:00
|
|
|
|
|
|
|
def strip_swift_symbols : Flag<["-"], "T">,
|
|
|
|
HelpText<"Remove Swift symbols">;
|