[PATCH] D96310: [llvm-objcopy] Delete --build-id-link-{dir,input,output}

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 21:19:08 PST 2021


phosek added a comment.

In D96310#2551952 <https://reviews.llvm.org/D96310#2551952>, @MaskRay wrote:

> I am figuring out whether we can retire `llvm/runtimes/llvm-strip-link.in`

I don't think we need it anymore for the Fuchsia toolchain build as we have since implemented a more generic mechanism providing similar functionality, but it may be also worth checking whether there are other users on llvm-dev.

> The functionality has llvm-readelf+ln replacement. It was implemented in llvm-objcopy for its convenience.

There are many features in LLVM tools you could in replace with other tools and some bash/Python glue, but usually at the expense of efficiency. In Fuchsia we rely heavily on build ID and for every binary we build, we want produce both stripped and unstripped version and link them into the `.build-id` directory. The problem with using `llvm-objcopy`+`llvm-readelf`+`ln` wrapped in a script is that it's more expensive. This may not be an issue if you do this once, but in our build it happens several hundred times and that's where the overhead becomes noticeable which is why we implemented this feature in `llvm-objcopy`.

The reason why I'm not pushing against the removal of this feature is that we've since found out that it's insufficient on its own and we needed additional logic, but prototyping new features in `llvm-objcopy` is quite difficult, so we have since implemented a custom downstream tool that we use instead. I'm hoping we could eventually upstream that functionality, but either as a separate tool or as an alternative frontend for `llvm-objcopy` akin to `llvm-strip`/`llvm-install-name-tool`.

> Debian Code Search tells me that no external open-source project uses the functionality. If it is used by some proprietary users, I think the best is an llvm-dev announcement that the options will be deleted if nobody speaks up. If nobody responds, we will delete the options.

I'd check with llvm-dev, Debian code search may not be sufficiently exhaustive.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96310/new/

https://reviews.llvm.org/D96310



More information about the llvm-commits mailing list