Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-11-22 09:58:25


Rene Rivera wrote:

>>>I don't see how this can solve your problem.
>>
>>Simply: it'll make only one linking working at the time.
>>
>>
>>>How is it that the linking is not distributed?
>>
>>Because I'm using distcc for distributing compilation. It preprocesses
>>sources and sends them for compilation to other hosts. But linking is
>>still done locally.
>
>
> Got it... so the problem is that you have multiple links going on in your
> local machine. I can see why that would be slow ;-)
>
> So I understand how the semaphore would fix this. About the only suggestion
> I have is to name the variable "SEMAPHORE" not "JAM_SEMAPHORE". That way it
> fits with things like SEARCH and LOCATE.

Agreed.

>>>Here I don't think that will work. If you put it at the end of the stack
>>>won't that make it break the build dependency order?
>>
>>Why, no. You can't build things before it's dependencies are built, but you
>>can delay building.
>
>
> The reason I thought that it would break things is that AFAIK it's one stack
> and it's populated in recursive order... and the stack doesn't do any
> dependency checking, so moving things in it would be problematic. But I'm
> probably wrong :-]

Actually, the implementation of semaphores treats them much in the same way as
dependencies. If there are unbuilt dependencies or already locked semaphores,
the state is just popped. Later, when dependencies are built or semaphores are
unlocked, the same target is placed to the stack again, and is really built.

Seems like I've got this working and will commit later. It really does not try
to run four linkers now!

- Volodya

 


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