[PATCH] D57217: llvm-objcopy: Add support for -g as an alias for --strip-debug
Douglas Yung via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 25 00:20:43 PST 2019
dyung updated this revision to Diff 183487.
dyung added a comment.
Remove redundant testing and leave in one check that -g and --strip-debug produce identical output.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57217/new/
https://reviews.llvm.org/D57217
Files:
test/tools/llvm-objcopy/ELF/strip-debug.test
tools/llvm-objcopy/ObjcopyOpts.td
Index: tools/llvm-objcopy/ObjcopyOpts.td
===================================================================
--- tools/llvm-objcopy/ObjcopyOpts.td
+++ tools/llvm-objcopy/ObjcopyOpts.td
@@ -95,6 +95,8 @@
HelpText<"Compatible with GNU objcopy's --strip-all">;
def strip_debug : Flag<["-", "--"], "strip-debug">,
HelpText<"Remove all debug information">;
+def g : Flag<["-"], "g">, Alias<strip_debug>,
+ HelpText<"Alias for --strip-debug">;
def strip_dwo : Flag<["-", "--"], "strip-dwo">,
HelpText<"Remove all DWARF .dwo sections from file">;
def strip_sections : Flag<["-", "--"], "strip-sections">,
Index: test/tools/llvm-objcopy/ELF/strip-debug.test
===================================================================
--- test/tools/llvm-objcopy/ELF/strip-debug.test
+++ test/tools/llvm-objcopy/ELF/strip-debug.test
@@ -6,6 +6,10 @@
# Verify that the previous run of llvm-objcopy has not modified the input.
# RUN: cmp %t %t3
+# RUN: llvm-objcopy -g %t %t2g
+# Verify that --strip-debug and -g produce the same output
+# RUN: cmp %t2 %t2g
+
# RUN: llvm-strip --strip-debug %t3
# RUN: cmp %t2 %t3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57217.183487.patch
Type: text/x-patch
Size: 1171 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190125/d35f7cfe/attachment.bin>
More information about the llvm-commits
mailing list