Boost logo

Boost-Build :

From: klapshin <klapshin_at_[hidden] (klapshin_at_[hidden])
Date: 2003-03-04 12:26:03


--- In jamboost_at_[hidden], Vladimir Prus <ghost_at_c...> wrote:
> 1. It reasonable desire to combine libraries in other libraries
> 2. When dynamic library is created, it's OK.
> 3. When static library is created, this does not work. For that
> reason, when creating static library we should convert library
sources
> into usage requirements.
>
> Uhm. the automatic moving of sources into usage requirement should
be
> possible without too much effort. But is it really better? For
linking targets
> inside Boost.Build it makes no different. If you want to use the
generated
> library outside Boost.Build, you either have to make it dynamic,
or tell
> the users to link all other libraries it depends upon. (Or course,
in current
> design, you'd have to link all the other libraries even if library
is
> dynamic).

Ok, lets put it this way: the dynamic libraries are default and more
common use case, correct? So they have to be built efficiently. At
the same time it would be nice to have an ability to link libraries
statically.

In dynamic case linking to "a" and "other_lib" while it is
sufficient to link to "a" only does not look right. Now the real
question is how smart linker is? If it is capable of removing extra
libs easily, then fine. Otherwise you can get really terrible
linking times in a projects consisting of numerous libraries. It
might be a step to N*N link time instead of N*lg(N) for well
designed system (e.g. with dependency graph close to a binary tree).

If link time is not affected, then there is no need to worry, and we
can get away with all the exrta linkage, and not to worry about
differences between static and dynamic libs.

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk