libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Q: library dependencies


From: Oleg Smolsky
Subject: Q: library dependencies
Date: Thu, 24 Sep 2020 11:04:14 -0700
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

Hello, I'm working on an autotools-based build system and finally decided to look into these messages:

  CXXLD    libtop.la
copying selected object files to avoid basename conflicts...

It looks like libtool links (copies?) .o files when it finds a dupe in the dependency DAG. Here is the situation I have w.r.t. the dependencies:

libtop.la: liba.la, libx.la
liba.la: libb.la libc.la libx.la

All these libraries are static, noinst_LILIBRARIES and the dependencies are expressed via _LIBADD syntax:

libtop_la_LIBADD = liba.la libx.la

I do this to get transitive dependencies where the top-level executable just needs to link to link libtop.la.

I think the issue is with libx.la as it is present in two different branches of the dependency DAG. This kind of thing is common in large projects and seems strange that libtool is trying to be smart about it.

Is there a way to tell automake/libtool to disable this copying and just do straightforward linking? I wonder if the current behavior results in unnecessary bloat?.. Or perhaps I am saved by the linker that would dedup?

Could someone clarify how this is supposed to work for large projects please?

Thanks!
Oleg.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]