summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
diff options
context:
space:
mode:
authorPaul Semel <semelpaul@gmail.com>2018-06-07 10:05:25 +0000
committerPaul Semel <semelpaul@gmail.com>2018-06-07 10:05:25 +0000
commite57bc783240cccfd19cef244294e7a0c87c46831 (patch)
tree83bd4ef19c912d65ca4e6bb47972be04cae814ad /llvm/tools/llvm-objcopy/llvm-objcopy.cpp
parente1d18758eb71bc8b17dbd95acccb61934095ef63 (diff)
downloadbcm5719-llvm-e57bc783240cccfd19cef244294e7a0c87c46831.tar.gz
bcm5719-llvm-e57bc783240cccfd19cef244294e7a0c87c46831.zip
[llvm-strip] Expose --strip-unneeded option
Differential Revision: https://reviews.llvm.org/D47818 llvm-svn: 334182
Diffstat (limited to 'llvm/tools/llvm-objcopy/llvm-objcopy.cpp')
-rw-r--r--llvm/tools/llvm-objcopy/llvm-objcopy.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
index 46769838aba..bf58f342ee4 100644
--- a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
+++ b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
@@ -583,12 +583,12 @@ CopyConfig ParseStripOptions(ArrayRef<const char *> ArgsArr) {
Config.OutputFilename =
InputArgs.getLastArgValue(STRIP_output, Positional[0]);
- // Strip debug info only.
Config.StripDebug = InputArgs.hasArg(STRIP_strip_debug);
Config.DiscardAll = InputArgs.hasArg(STRIP_discard_all);
-
- if (!Config.StripDebug && !Config.DiscardAll)
+ Config.StripUnneeded = InputArgs.hasArg(STRIP_strip_unneeded);
+
+ if (!Config.StripDebug && !Config.StripUnneeded && !Config.DiscardAll)
Config.StripAll = true;
for (auto Arg : InputArgs.filtered(STRIP_remove_section))
OpenPOWER on IntegriCloud