<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/117113>117113</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[lld][MachO] Implement support for `-allowable_client`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
lld
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
carlocab
</td>
</tr>
</table>
<pre>
This is a follow-up to #114638 and #114146.
In #114638, we implemented support for linking against libraries that were linked with `-allowable_client`, but it is currently only possible to produce these libraries using Apple `ld64`.
We should teach `ld64.lld` to do the same. This will allow us to get rid of the [`liballowable_client.dylib`](https://github.com/llvm/llvm-project/blob/32913724acf9e02beed46999fee1424086b8c884/lld/test/MachO/Inputs/liballowable_client.dylib) binary test fixture (used in [`allowable-client.s`](https://github.com/llvm/llvm-project/blob/32913724acf9e02beed46999fee1424086b8c884/lld/test/MachO/allowable-client.s)).
It suffices to populate the `LC_SUB_CLIENT` field(s) in the MachO header with the name(s) passed to `-allowable_client`.
I plan to work on this myself, but I've opened this to make sure this is being tracked somewhere (in case I don't get to it).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEVM2O4zYTfBrq0hiDpGRJPOgwM_4MGNgvOWSDHAek2LKYoUiBP-P47QPKdjYT7B5yysWGpGJ3Fau6ZYzm7BAHsn8h-0Mlc5p9GEYZrB-lqpTX1-HrbCKYCBImb62_POUVkgfCa8aatu5BOn1_Yk27I_RA6PPt9-S-wQh_hQuCWVaLC7qEGmJeVx8STD6ANe7duDPIszQuJrBGBRkMRkizTHDBgBsGNVxMmoG09EkWOlJZfButQZdIS0sXlROYVCiPOQR0yV7BO3uF1cdolMVCfw1e5xEhzRjxb91yLCye19Vi6WF125CWflL1G0KcfbYaEspxfsB21mrS0lJc-1IXolxwB9v9XYy1sPGFHAvkjAmC0eCnDVoMaKk16p-advpqjSrK9gfC-zmlNZL6mfAj4cezSXNWu9EvhB-t_Xj8Pa3B_45jIvyorFeEH2suWN3xRo6TQMoVom5aIcSEyBre0L5V_dj3zVZAE35MGMvx_8tx_pnw48mtOcXy9YcUuQBlnAxXKGdhMn-kHBAI73NEDcbdRf51_Ol-PP7n6r5DiQvCxecwJ4h5msyIm4GrX7OVCW_2tfTL69svv768vX45_e-nryUHk8HSqy-1ivqC2xrCjFJjuOW4vHVywQdwlbHcVhmw7yf8MydYrXQFffHhHXzpYiIs14h2eszCifDuA8Gv6ErlAkgeFvmOEItD6T7gCkv0U5BjmbLoF7zMeHPQOBhlRDiB9o7wLm35TR5MKtdU6aHWohaywoF1NWetaFhXzQPTlIpuwk6P-75DhrqfUOw1lWOnOGeVGTjlDWOc0ZZR1u3abqK1EKpjfa-EFqShuEhjd8X5nQ_nysSYcWCsY6yurFRo47a_ON-85WWRhWELisrnSBpqTUzxW4Fkkt1WXsHvD2T_csvB_gCnx3b6tJt-4ESVgx3-dWQ3-mWS7go-Bv5nAAAA___R4MXX">