This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objcopy] Add -S option to llvm-objcopy and llvm-strip
AbandonedPublic

Authored by jakehehrlich on Dec 12 2017, 4:24 PM.

Details

Reviewers
phosek
jhenderson
Summary

-S means something different in GNU strip and GNU objcopy. We'd like to have the respective llvm versions maintain command line compatibility. In strip it means --strip-debug and in objcopy it means --strip-all. This change adds support for -S to both.

Diff Detail

Repository
rL LLVM

Event Timeline

jakehehrlich created this revision.Dec 12 2017, 4:24 PM

Why is -S a hidden option?

tools/llvm-objcopy/llvm-objcopy.cpp
354

This line hasn't been clang-formatted.

Why is -S a hidden option?

It can't be given a consistent description across llvm-objcopy and llvm-strip (it's also the only option that has that property). It's also consistent with aliases for the long name options being hidden. In my mind it's really there for command line compatibility and nothing else.

jhenderson accepted this revision.Dec 14 2017, 2:03 AM

Okay, LGTM, with the clang-formatting comment addressed.

This revision is now accepted and ready to land.Dec 14 2017, 2:03 AM
jakehehrlich abandoned this revision.Dec 19 2017, 12:58 PM