Boost logo

Boost-Build :

Subject: Re: [Boost-build] prototyping alternative Boost.Build syntax
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2016-11-04 18:42:39


On 04.11.2016 16:43, Steven Watanabe wrote:
> AMDG
>
> On 11/04/2016 01:21 PM, Stefan Seefeld wrote:
>> On 04.11.2016 11:18, Steven Watanabe wrote:
>>> On 11/04/2016 07:29 AM, Stefan Seefeld wrote:
>>>> Thus I have a few questions:
>>>>
>>>> * where in the code are target settings activated / deactivated so they
>>>> are visible to actions ?
>>> Target settings are applied in make1.c
>>> around the call to the action.
>> It looks like the functions doing this might be
>> "function_bind_variables" and "function_unbind_variables" (which for
>> python functions don't do anything). Can you confirm that ? Can you
>> explain how they work ?
>>
> No. Those two functions are purely optimizations
> that affect the implementation of name lookup
> inside jam rules.
>
> The settings are applied here:
> https://github.com/boostorg/build/blob/develop/src/engine/make1.c#L1087
>
> The call to the action is inside cmd_new:
> https://github.com/boostorg/build/blob/develop/src/engine/make1.c#L1125
>
> which is defined here:
> https://github.com/boostorg/build/blob/develop/src/engine/command.c#L61

Oh, I see. And now I understand why the command execution doesn't share
an environment: All environment variables are represented as variables
inside bjam ! It seems there is a lot of string copying going on. I
wonder how much performance improvement can be gained by simply
persisting the environment (and only overwriting the variables that
actually change).

Thanks,
        Stefan

-- 
      ...ich hab' noch einen Koffer in Berlin...

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