|
Boost-Build : |
Subject: Re: [Boost-build] merge request
From: Juraj Ivanèiæ (juraj.ivancic_at_[hidden])
Date: 2014-06-26 06:56:46
On 24.6.2014. 13:56, Phillip Seaver wrote:
> On 6/24/14, 4:32 AM, Juraj Ivanèiæ wrote:
>> * Should these scripts be created on each b2 invocation, even if they
>> already exist?
>>
>> My first thought was yes, but an unfortunate consequence is that you
>> will have targets updating on a fully built project. In addition,
>> parallel b2 builds might interfere with each other. Is it OK to assume
>> if a script already exists that its content is valid? Perhaps some
>> combination of the two? E.g. assume that the script is valid unless
>> --force-msvc-script-gen is passed on the command line.
>
> Can you make them dependent on the .jam file that generated them? And
I'd like nothing better, but I don't see how. Toolset gets initialized
first, so at the time scripts are being created no user files have been
read/accessed. If this were possible, the entire problem wouldn't have
existed in the first place - scripts would be generated in a build-local
directory (i.e. bin\), instead of a global one (TEMP).
It seems to me that the best we can do for now is to generate files if
they are missing, and assume that they are valid if they already exist.
That way there wouldn't be any additional b2 startup cost, and no
conflicts on parallel b2 builds. I cannot think of a reasonable scenario
where this would fail.
> the original batch files, if you're using them to create the scripts (I
> haven't looked at the patch, so I'm just guessing). I doubt they'll
> change often, if at all, but it seems safer.
I doubt this would prove useful. vcvarsall calls other batch files, so
these would have to be taken into account as well. It also does registry
queries, so there is really no telling what its dependencies are.
> One thing I've thought of before that might be helpful in this case
> would be a way to generate a new version of a file and compare it to the
> existing file. If the new version is different, replace the file,
> otherwise, leave it alone. It would have to happen before b2 checked to
> see the timestamp of a dependency, though.
I don't see how this is better than always generating the file. At least
the latter does not need to do file comparison.
>> * Should I add a command line option to restore old behavior, just in
>> case? Something like --no-msvc-script-gen?
>
> It's probably good to have a way to turn it off without having to revert
> the changes. Something you can set in user or system configuration
> might be more helpful, so you can turn it off without having to remember
> to use the argument every time.
Good idea.
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