|
Boost-Build : |
Subject: Re: [Boost-build] prototyping alternative Boost.Build syntax
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2016-10-31 12:29:30
AMDG
On 10/31/2016 10:20 AM, Stefan Seefeld wrote:
> Hi Steven,
>
> coming back to this question...
>
> On 29.10.2016 16:50, Steven Watanabe wrote:
>>
>>> * what is the environment an action is executed in ? Is this the
>>> environment 'b2' was started in ? Can I modify that environment (either
>>> globally or locally) prior to executing actions ?
>>>
>> b2 doesn't change the environment at all.
>> If you want to modify the environment it
>> has to be done as part of the action body.
>
> When building with MSVC, somewhere in the process one of these
> "vcvars32.bat" scripts is read in to set up environment variables that
> are later used during the invocation of "cl.exe" etc. As I suppose that
> script isn't read in on each invocation of an action that calls one of
> the MSVC tools, I suppose some form of environment sharing has to be used.
> Am I wrong ?
>
vcvars32.bat is called on every invocation of
the compiler. There is no environment sharing.
(Actually, Boost.Build writes its own version
of vcvars32.bat because on some version of msvc,
the provided vcvars32.bat is quite slow. However,
for your purposes, this detail doesn't really matter.
The point is that the environment must be set
up from scratch every time.)
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