summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
diff options
context:
space:
mode:
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