Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2003-03-28 11:40:13


Ali Azarbayejani <ali_at_[hidden]> writes:

> [d] [c] [b] [a] * Normal "shared" linking scheme
> [d] [c] [b<a>] - realistic
> [d] [c<b>] [a] - realistic
> [d] [c<b><a>] - realistic
> [d] [c<ba>]
> [d<c>] [b] [a] - realistic
> [d<c>] [b<a>] - realistic
> [d<c><b>] [a] - realistic
> [d<cb>] [a]
> [d<c><b><a>] * Normal "static" linking scheme
> [d<cb><a>]
> [d<c><ba>]
> [d<cba>]
>
> The normal "shared" scheme is currently implemented by propagating
> <link>shared to all the library targets. The normal "static" scheme
> is currently implemented by propagating <link>static.
>
> The schemes labeled "realistic" involve "shared libs linked to
> archives", and are realistic build scenarios that should be supported.
> Does anyone have any thoughts on how these schemes are to be expressed
> in BBv2?
>
> The unmarked schemes contain "archives linked to archives", which,
> outside of BBv2, would not normally be considered. So I don't care so
> much about these, but it would be interesting to consider how these
> might be expressed because they are somewhat of a parallel concept to
> "shared lib linked to archive".

I think it may be reasonable to say that a library may specify how it
interoperates with the libraries it "uses", which obviously would
prevent users from requesting different configurations. So we might
have (assuming shared linking is the default):

[d] [c] [b] [a] * Normal "shared" linking scheme

lib a : $(ASrc) ;
lib b : $(BSrc) a ;
lib c : $(CSrc) b ;

[d] [c] [b<a>] - realistic

lib a : $(ASrc) ;
lib b : $(BSrc) <static>a ;
lib c : $(CSrc) b ;

[d] [c<b>] [a] - realistic

lib a : $(ASrc) ;
lib b : $(BSrc) <static>b ;
lib c : $(CSrc) b ;

[d] [c<b><a>] - realistic

lib a : $(ASrc) ;
lib b : $(BSrc) a ;
lib c : $(CSrc) b : <link-libs>static ;

[d] [c<ba>]

lib a : $(ASrc) ;
lib b : $(BSrc) <static>a ;
lib c : $(CSrc) b : <link-libs>static ;

-or-

lib a : $(ASrc) ;
lib b : $(BSrc) <static>a ;
lib c : $(CSrc) <static>b ;

[d<c>] [b] [a] - realistic

lib a : $(ASrc) ;
lib b : $(BSrc) ;
lib c : $(CSrc) : <link>static ;

[d<c>] [b<a>] - realistic

lib a : $(ASrc) ;
lib b : $(BSrc) <static>a ;
lib c : $(CSrc) : <link>static ;

[d<c><b>] [a] - realistic

lib a : $(ASrc) ;
lib b : $(BSrc) a : <link>static ;
lib c : $(CSrc) b : <link>static ;

[d<cb>] [a]

lib a : $(ASrc) ;
lib b : $(BSrc) a : <link>static ;
lib c : $(CSrc) b : <link-libs>static ;

[d<c><b><a>] * Normal "static" linking scheme

... I'm getting tired; you get the idea...

[d<cb><a>]
[d<c><ba>]
[d<cba>]

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com
 

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