Many build systems need a drop in replacement for strip as well as objcopy. This change adds a symlink to llvm-strip for llvm-objcopy. The plan is for llvm-objcopy to detect when it was invoked as llvm-strip/strip and to change it's behavoir correspondingly. See https://reviews.llvm.org/D41100 for details on the whole plan.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
The reason you didn't see this change was that I didn't add you as a reviewer. I think I thought Petr was going to quickly review this. Anyway slight update on this: I might forgo symlinking llvm-strip and opt for making two binaries via the same CMakeLists.txt. Right now this dosn't seem possible but we're investigating adding it.
Slight update on the direction of this. I'm currently working on two fairly major changes to llvm-objcopy.cpp. 1) is to add the binary input type along with the -B option and the and 2) is for this. I've settled on switching arguments from using the CommandLine library to instead using TableGen for options. This will let llvm-strip and llvm-objcopy share the same executable and have different arguments. So this change will go in at some point but the other changes (-o, -S, etc...) will be abandoned. I played around a lot with the more drastic option of producing two executable and that's a nightmare thanks to CMake. It's also not what other tools have done (see llvm-ar) and using a symlink will reduce toolchain sizes so it seems strictly better from that perspective. Clang, llvm-ar, and I think a couple other tools all use this symlink trick but they also use TableGen so that most of this stuff isn't an issue. So just this change is ready to be reviewed.