summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
diff options
context:
space:
mode:
authorAlexander Shaposhnikov <shal1t712@gmail.com>2018-06-06 21:23:19 +0000
committerAlexander Shaposhnikov <shal1t712@gmail.com>2018-06-06 21:23:19 +0000
commit29407f3abe1632df8acb8c578501da1165b251bd (patch)
treea56340d2bde30870725de0e4ba0da136045f2a1f /llvm/tools/llvm-objcopy/llvm-objcopy.cpp
parent4ef9117b49edd323ed07f0c4a3480fb6c53fbc21 (diff)
downloadbcm5719-llvm-29407f3abe1632df8acb8c578501da1165b251bd.tar.gz
bcm5719-llvm-29407f3abe1632df8acb8c578501da1165b251bd.zip
[llvm-strip] Expose --discard-all option
Expose objcopy's --discard-all option in llvm-strip. Test plan: make check-all Differential revision: https://reviews.llvm.org/D47750 llvm-svn: 334131
Diffstat (limited to 'llvm/tools/llvm-objcopy/llvm-objcopy.cpp')
-rw-r--r--llvm/tools/llvm-objcopy/llvm-objcopy.cpp5
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))
OpenPOWER on IntegriCloud