[PATCH] D105482: [lld/mac] Partially implement -export_dynamic

Thorsten via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 6 08:44:05 PDT 2021


tschuett added a comment.

In D105482#2859987 <https://reviews.llvm.org/D105482#2859987>, @thakis wrote:

> In D105482#2859951 <https://reviews.llvm.org/D105482#2859951>, @tschuett wrote:
>
>> In D105482#2859935 <https://reviews.llvm.org/D105482#2859935>, @thakis wrote:
>>
>>> Thanks!
>>>
>>> It _only_ passes with `%lld` :) (But only because ld uses a different symbol order.) I ran it with ld locally to verify that our list of exported symbols matches ld64 (…except for ordering). And then I forgot to undo it before uploading, but luckily the precommit bots caught it.
>>
>> Could you sort the symbols to make it independent of the order, i.e. it works with ld and lld?

I though of something like `llvm-objdump ... | grep ... | sort` and then do FileCheck on the result.

> There's no good way (I know of) to tell FileCheck "Do CHECK-DAG: for all these lines, but don't allow any other lines to interleave". The motivation for all these `-NEXT`s is to check that nothing else is in the symbol table other than what's listed in the test.
>
> If there's a way to achieve this with `CHECK-DAG`, I'd be glad to hear about it.
>
> Many of our tests don't pass as-is with ld though. (Some do, and I often swap out `%lld` for `ld` either manually or by editing lld/test/MachO/lit.local.cfg when I'm working on a test, so I think having more tests pass with both linkers is definitely useful when it's easy to do.)




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105482



More information about the llvm-commits mailing list