diff options
| author | Jordan Rupprecht <rupprecht@google.com> | 2018-09-21 00:47:31 +0000 |
|---|---|---|
| committer | Jordan Rupprecht <rupprecht@google.com> | 2018-09-21 00:47:31 +0000 |
| commit | 7b1c8168c7912e2cb5b10ad56f836ccc552e3c0e (patch) | |
| tree | 27653ae5e924f0b485ba56542dee2051993e2c08 /llvm/tools/llvm-objcopy/StripOpts.td | |
| parent | 07bbddb4ba8c57dd745fe6f486101d445e59ad10 (diff) | |
| download | bcm5719-llvm-7b1c8168c7912e2cb5b10ad56f836ccc552e3c0e.tar.gz bcm5719-llvm-7b1c8168c7912e2cb5b10ad56f836ccc552e3c0e.zip | |
[llvm-objcopy/llvm-strip]: handle --version
Summary:
Implement --version for objcopy and strip.
I think there are LLVM utilities that automatically handle this, but that doesn't seem to work with custom parsing since this binary handles both objcopy and strip, so it uses custom parsing.
This fixes PR38298
Reviewers: jhenderson, alexshap, jakehehrlich
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52328
llvm-svn: 342702
Diffstat (limited to 'llvm/tools/llvm-objcopy/StripOpts.td')
| -rw-r--r-- | llvm/tools/llvm-objcopy/StripOpts.td | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/tools/llvm-objcopy/StripOpts.td b/llvm/tools/llvm-objcopy/StripOpts.td index 5abc23fb577..821dfa3b277 100644 --- a/llvm/tools/llvm-objcopy/StripOpts.td +++ b/llvm/tools/llvm-objcopy/StripOpts.td @@ -47,6 +47,10 @@ def K : JoinedOrSeparate<["-"], "K">, def discard_all : Flag<["-", "--"], "discard-all">, HelpText<"Remove all local symbols except file and section symbols">; + +def version : Flag<[ "-", "--" ], "version">, + HelpText<"Print the version and exit.">; + def x : Flag<["-"], "x">, Alias<discard_all>; |

