[PATCH] D82410: [llvm-install-name-tool] Add -id option
Sameer Arora via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 23 14:32:06 PDT 2020
sameerarora101 created this revision.
sameerarora101 added reviewers: jhenderson, alexshap, Ktwu, smeenai.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a reviewer: rupprecht.
Herald added a project: LLVM.
sameerarora101 edited the summary of this revision.
sameerarora101 edited the summary of this revision.
sameerarora101 marked 2 inline comments as done.
sameerarora101 added inline comments.
================
Comment at: llvm/test/tools/llvm-objcopy/MachO/install-name-tool-id.test:11
+
+## Specifying -id more than once:
+# RUN: llvm-install-name-tool -id /usr/lib/B_long -id /usr/lib/K_long -id /usr/A_short %t
----------------
NOTE: this behavior is different from cctool's. The cctool's version throws an error on specifying multiple `-id` options, but keeping @jhenderson comments in mind from `-delete_rpath`, we allowed for multiple `-id` options currently.
================
Comment at: llvm/test/tools/llvm-objcopy/MachO/install-name-tool-id.test:17
+
+## Specifying -id with empty string:
+# RUN: not llvm-install-name-tool -id '' %t 2>&1 | \
----------------
NOTE: this behavior is also different from cctool's. cctools allows for an empty id string (i.e `-id ''`). But we thought it would not be useful to allow for empty strings and so we throw an error right now.
Implement `-id` option for install-name-tool. Differences from cctool's
behavior:
- Does **NOT** throw an error if multiple -id options are specified. Instead, picks the last one.
- Throws an error in case empty id is specified.
Depends on D82051 <https://reviews.llvm.org/D82051>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D82410
Files:
llvm/test/tools/llvm-objcopy/MachO/install-name-tool-id.test
llvm/tools/llvm-objcopy/CopyConfig.cpp
llvm/tools/llvm-objcopy/CopyConfig.h
llvm/tools/llvm-objcopy/InstallNameToolOpts.td
llvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82410.272821.patch
Type: text/x-patch
Size: 4458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200623/3ce71b74/attachment.bin>
More information about the llvm-commits
mailing list