[PATCH] D39821: Add CLANG_DEFAULT_OBJCOPY to allow Clang to use llvm-objcopy for dwarf fission

Jake Ehrlich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 10 10:51:49 PST 2017


jakehehrlich added a comment.

> Another option would be to restrict `CLANG_DEFAULT_OBJCOPY` to contain `objcopy` or even to only allow `objcopy` or `llvm-objcopy`. I don't know if that's sensible though...

I think there are some other strip/objcopy like implementations out there but I think objcopy and llvm-objcopy are the only ones that support --extract-dwo and --strip-dwo right now but more could come. I think objcopy and llvm-objcopy are the only ones that have "objcopy" in the name so the current test kind of enforces that one of them must be used. Also the user might want to pull objcopy or llvm-objcopy from a specific place on their system (not just from PATH) so however we restrict this, it will have to be much more general than just allowing "objcopy" or "llvm-objcopy". That said restricting the set of program names seems reasonable to me since you should in theory be able to add your program to the CMakeList.txt check on CLANG_DEFAULT_OBJCOPY if you want clang to support it. I don't think any other implementation of objcopy is likely to exist anytime soon though so it seems kind of moot to me.


Repository:
  rL LLVM

https://reviews.llvm.org/D39821





More information about the cfe-commits mailing list