1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

[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:
Martin Storsjo 2018-11-28 06:51:50 +00:00
parent 0953e7ad7b
commit 289364c5e7
5 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,5 @@
# RUN: llvm-objcopy -version | FileCheck %s
# RUN: llvm-objcopy --version | FileCheck %s
# RUN: llvm-objcopy -V | FileCheck %s
# CHECK: {{ version }}

View File

@ -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

View File

@ -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);
}

View File

@ -165,3 +165,4 @@ defm prefix_symbols
def version : Flag<["-", "--"], "version">,
HelpText<"Print the version and exit.">;
def V : Flag<["-"], "V">, Alias<version>;

View File

@ -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>;