Boost logo

Boost-Build :

Subject: Re: [Boost-build] Dependencies dropped during concurrent builds
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2013-11-03 13:32:38


AMDG

Retrying...

On 11/01/2013 10:37 PM, Vladimir Prus wrote:
> On 02.11.2013 03:13, Steven Watanabe wrote:
>>
>> Property handling in Boost.Build is very inefficient.
>> I've done what I could, but it really needs to be
>> rewritten completely.
>
> Do you have specific design in mind?

No, not really. The basic problem is that
we have large lists that are copied around
with minor variations. Somehow, we need
to split it up so that the parts that don't
change are shared. It also doesn't help
that there are multiple representations
of the same property-set. (e.g. depending
on whether composites and subfeatures are
expanded)

> Besides optimization, which would
> certainly needed,
> it would be nice to change the algorithm for metataget generation so
> that we first pick toolchain
> using user-provided properties, and then add other properties inferred
> from this toolchain,
> so that for example address-model is always set to some value.
>

Maybe. I know people have asked for something
like this in the past, but I worry that the
extra complexity would create more surprises
than it solves.

The algorithm would have to be something like:

rule set-defaults ( requirements * ) ;

rule add-defaults ( properties * )
{
    local best-requirements
    for each set of requirements
       if properties is consistent with requirements
           if requirements is a better match than best-requirements
               set best-requirements = requirements
    check if there is no best match or no match at all,
        and do something appropriate
    add best-requirements to properties
}

# example:
set-defaults <toolset>gcc-4.7 <a>property <more>properties ;
set-defaults <toolset>gcc-4.8 <another>property ;

add_defaults <toolset>gcc-4.7 ;
 -> <toolset>gcc-4.7 <a>property <more>properties
add_defaults <a>property ;
 -> <toolset>gcc-4.7 <a>property <more>properties

Note: This could be made generic by specifying an
id for set-defaults, and then selecting the best
match for each id.

In Christ,
Steven Watanabe


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