forked from OSchip/llvm-project
[llvm-objcopy] Hook up the -V alias to --version, output "GNU strip"
This allows libtool to detect the presence of llvm-strip and use it with the options --strip-debug and --strip-unneeded. Also hook up the -V alias for objcopy. Differential Revision: https://reviews.llvm.org/D54936 llvm-svn: 347731
This commit is contained in:
parent
dab73ce1dc
commit
e9af715820
|
@ -1,4 +1,5 @@
|
|||
# RUN: llvm-objcopy -version | FileCheck %s
|
||||
# RUN: llvm-objcopy --version | FileCheck %s
|
||||
# RUN: llvm-objcopy -V | FileCheck %s
|
||||
|
||||
# CHECK: {{ version }}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
# RUN: llvm-strip -version | FileCheck %s
|
||||
# RUN: llvm-strip --version | FileCheck %s
|
||||
# RUN: llvm-strip -V | FileCheck %s
|
||||
|
||||
# CHECK: {{ version }}
|
||||
# CHECK-DAG: {{ version }}
|
||||
# CHECK-DAG: GNU strip
|
||||
|
|
|
@ -226,6 +226,7 @@ DriverConfig parseObjcopyOptions(ArrayRef<const char *> ArgsArr) {
|
|||
}
|
||||
|
||||
if (InputArgs.hasArg(OBJCOPY_version)) {
|
||||
outs() << "llvm-objcopy, compatible with GNU objcopy\n";
|
||||
cl::PrintVersionMessage();
|
||||
exit(0);
|
||||
}
|
||||
|
@ -383,6 +384,7 @@ DriverConfig parseStripOptions(ArrayRef<const char *> ArgsArr) {
|
|||
}
|
||||
|
||||
if (InputArgs.hasArg(STRIP_version)) {
|
||||
outs() << "llvm-strip, compatible with GNU strip\n";
|
||||
cl::PrintVersionMessage();
|
||||
exit(0);
|
||||
}
|
||||
|
|
|
@ -165,3 +165,4 @@ defm prefix_symbols
|
|||
|
||||
def version : Flag<["-", "--"], "version">,
|
||||
HelpText<"Print the version and exit.">;
|
||||
def V : Flag<["-"], "V">, Alias<version>;
|
||||
|
|
|
@ -64,3 +64,4 @@ def x : Flag<["-"], "x">, Alias<discard_all>;
|
|||
|
||||
def version : Flag<["-", "--"], "version">,
|
||||
HelpText<"Print the version and exit.">;
|
||||
def V : Flag<["-"], "V">, Alias<version>;
|
||||
|
|
Loading…
Reference in New Issue