From e57bc783240cccfd19cef244294e7a0c87c46831 Mon Sep 17 00:00:00 2001 From: Paul Semel Date: Thu, 7 Jun 2018 10:05:25 +0000 Subject: [llvm-strip] Expose --strip-unneeded option Differential Revision: https://reviews.llvm.org/D47818 llvm-svn: 334182 --- llvm/tools/llvm-objcopy/llvm-objcopy.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/tools/llvm-objcopy/llvm-objcopy.cpp') 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 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)) -- cgit v1.2.3