[Scons-users] SCons working with Ninja
Mats Wichmann
mats at wichmann.us
Wed Apr 14 16:47:28 EDT 2021
On 4/14/21 2:22 PM, Gary Granger wrote:
> Hello Don,
>
> For whatever it's worth, we have a tool to generate ninja files from
> SCons, but I did not try to solve the problem of running python
> functions from ninja. Instead, the tool generates a ninja build file
> from the nodes, and then it lets scons build just the nodes which do not
> use command line actions. Most of our python function builders generate
> source files and version header files, so they are the leaves of the
> dependency graph and it doesn't matter if ninja cannot build them.
> Building the few python actions establishes a 'build baseline', then
> ninja builds the rest. Obviously not complete, since someone has to
> remember to rebuild the ninja file if the python dependencies change.
> Although I suppose the tool could be modified to list all the python
> targets with a rule to re-run scons to build just those. And maybe this
> does not help you, if most of your actions are not command lines.
>
> That said, we don't use this much because in practice it's easier to
> just stick with scons for everything.
>
> https://github.com/NCAR/eol_scons/blob/master/eol_scons/tools/ninja.py
>
> The ninja support mentioned by Mats is surprising news, I'll be
> interested to see how that works.
The current PR is here: https://github.com/SCons/scons/pull/3642
or maybe the folks working on it will comment further.
>
> Gary
>
> On 4/14/21 1:42 PM, Don Baldwin wrote:
>> Thanks Mats. Will this be implemented in SCons 3.x as well as 4.x?
>> We are planning on moving to 4.x fairly soon, but we aren't there yet,
>> and will probably not move our older projects to 4.x. Also, do you
>> have an ETA of when this will be available?
>>
>> Also, what about existing tools that claim to support generating Ninja
>> scripts from SCons builds, such as:
>>
>> * https://github.com/RedBeard0531/mongo_module_ninja
it's related to Mongo's Ninja module.
More information about the Scons-users
mailing list