This change adds an option -g to llvm-objcopy which is an alias for the existing option --strip-debug.
I also modified the existing tests which use the --strip-debug option to exercise the -g option as well.
This fixes PR40003.
Paths
| Differential D57217
llvm-objcopy: Add support for -g as an alias for --strip-debug ClosedPublic Authored by dyung on Jan 24 2019, 8:26 PM.
Details Summary This change adds an option -g to llvm-objcopy which is an alias for the existing option --strip-debug. I also modified the existing tests which use the --strip-debug option to exercise the -g option as well. This fixes PR40003.
Diff Detail Event Timeline
Comment Actions Code lgtm, just have nits on the testing. Thanks!
Comment Actions Remove redundant testing and leave in one check that -g and --strip-debug produce identical output. This revision is now accepted and ready to land.Jan 25 2019, 12:47 AM Closed by commit rL352182: [llvm-objcopy] Add support for -g as an alias for --strip-debug (authored by dyung). · Explain WhyJan 25 2019, 1:57 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 183475 test/tools/llvm-objcopy/COFF/only-section.testtest/tools/llvm-objcopy/COFF/strip-debug.test
test/tools/llvm-objcopy/ELF/help-message.test
test/tools/llvm-objcopy/ELF/strip-debug-and-remove.test
test/tools/llvm-objcopy/ELF/strip-debug.test
tools/llvm-objcopy/ObjcopyOpts.td
|
i don't have a strong opinion regarding this, but generally when the output is expected to be exactly the same i wouldn't do text matching twice (it all contributes to the time it takes to run all the tests), i'd simply run cmp %t.combination.exe %t.combination_g.exe - it's much cheaper.
p.s. maybe there are other similar places, pls, have a look.