[LLD] Cyclic dependency between ReaderWriter and YAML backend

Chandler Carruth chandlerc at google.com
Mon Sep 2 21:30:52 PDT 2013


On Mon, Sep 2, 2013 at 9:28 PM, Shankar Easwaran <shankare at codeaurora.org>wrote:

> On 9/2/2013 11:09 PM, Chandler Carruth wrote:
>
>> I really don't follow what you're saying. Not all linkers are capable of
>> resolving cyclic references using start-group/end-group even for static
>> links. Thus, I'm suggesting we shouldn't include such patterns in any art
>> of our design. I don't know if it does today or not, I'm merely responding
>> to your comment that cyclic dependencies could be handled with
>> start-group/end-group to clarify that this isn't a viable solution on all
>> platforms where LLVM projects are being built.
>>
> Sorry for being terse.
>
> I totally agree to your point that, we shouldnot be using
> --start-group/--end-group.
>
> What I was trying to mention here is :-
>
> a) Currently lld creates a shared library for each of the individual
> components when BUILD_SHARED_LIBS is turned on.
> The list of libraries are liblldYAML, liblldELF and so on.
>
> Inorder for utilities to link with lld libraries, doesnt llvm-config need
> to contain the list of lld libraries too, that the tools need inorder to
> link with ?


I see.

Yes this seems true today, but I agree we're no where near the point that
it makes sense for consumers to link against the LLD libraries. When we
want to start supporting it, we will indeed have to design some way to list
the correct set of libraries. Either with a config command, or by building
a single shared library (distinct from the current collection of small,
well factored libraries) that is the "external" interface. Anyways, this is
a long way away. I just didn't want circularity to creep in within LLD
itself.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130902/ef6674d3/attachment.html>


More information about the llvm-commits mailing list