[PATCH] D88674: [install-name-tool] Add --delete_all_rpaths to llvm-install-name-tool

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 16:31:30 PDT 2020


rupprecht added a comment.

In D88674#2313985 <https://reviews.llvm.org/D88674#2313985>, @jhenderson wrote:

> +1 to being okay to extend the tools with other useful options. Before we rush headlong into this option, I wonder whether we should instead allow the existing delete option to take a wildcard/glob pattern/regex thing. That way you could just delete e.g. "*" to remove all rpaths, or "*.foo" to delete all ending in ".foo" etc. From a compatibility concern, it might mean we need to add an option similar to e.g. --regex in llvm-objcopy which enables the pattern matching.
>
> What do others think?
>
> If people think this is being overly general, the proposed option in this patch is fine by me too.

Same here -- that seems like it would be a better patch.

In D88674#2314150 <https://reviews.llvm.org/D88674#2314150>, @thieta wrote:

> I don't have a strong opinion on what's best - both will solve my problem, if people think it would be better to use a regex I can rework the patch to do that (as long as there is a good regex implementation in LLVM I can use already).

There is -- see `NameOrPattern` and `NameMatcher` in `CopyConfig.h`. You would also have to add `--regex` and/or `--wildcard` flags, which AIUI are not part of `install_name_tool`. So that would also be a flag incompatibility, but maybe a better one.

There is some validation that all `RPathsToRemove` are used, so you will have to handle that differently -- it might be easier to just drop that if wildcards/regexes are used.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88674



More information about the llvm-commits mailing list