diff options
Diffstat (limited to 'llvm/tools/llvm-objcopy/llvm-objcopy.cpp')
-rw-r--r-- | llvm/tools/llvm-objcopy/llvm-objcopy.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp index 0563af93290..46769838aba 100644 --- a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp +++ b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp @@ -585,7 +585,10 @@ CopyConfig ParseStripOptions(ArrayRef<const char *> ArgsArr) { // Strip debug info only. Config.StripDebug = InputArgs.hasArg(STRIP_strip_debug); - if (!Config.StripDebug) + + Config.DiscardAll = InputArgs.hasArg(STRIP_discard_all); + + if (!Config.StripDebug && !Config.DiscardAll) Config.StripAll = true; for (auto Arg : InputArgs.filtered(STRIP_remove_section)) |