[Scons-users] Parallel build when using python build actions

Ivan ivan at imihajlov.tk
Tue Mar 9 05:59:37 EST 2021


Hi folks,

I have my custom toolchain written in python. I want to import my compiler/linker/assembler modules from the SConstruct file and call them as Python functions instead of invoking them as scripts.

I've managed to do that, but it seems that scons only executes one job at a time.  Here's my SConstruct: https://github.com/imihajlow/ccpu/blob/scons-optimize/app/SConstruct <https://github.com/imihajlow/ccpu/blob/scons-optimize/app/SConstruct>
Here's what `time scons` outputs for python function actions:

scons  8.80s user 0.77s system 108% cpu 8.807 total

And here's with the normal string actions:

scons  18.92s user 2.88s system 490% cpu 4.440 total

You can see that the CPU time is much lower in the first case, but the real time is twice as high because only one core is used.

Am I doing something wrong or is that a bug/feature of scons?

Best regards,
Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20210309/89c4d65f/attachment.html>


More information about the Scons-users mailing list