[Scons-users] Is there a way to isolate building a specific file
Erik Kazandjian
erik.kazandjian at gmail.com
Mon Jun 29 05:48:18 EDT 2020
I'm using the library builder to build my libraries and the SideEffect
trick doesn' t seem to work. This is how my sconscript looks like
t=env.File(os.path.join(env['LIBS_DIR'].abspath, 'biglib1'))
u=env.File(os.path.join(env['LIBS_DIR'].abspath, 'biglib2'))
l1 = myEnv.Library(t, ["bigfile1cc"])
l2 = myEnv.Library(u, ["bigfile2.cc"])
side_effect=env.File('.serialize', env['DO_DIR'])
env.SideEffect(side_effect,l1)
env.SideEffect(side_effect,l2)
Alias('build', [
l1,
l2,
])
But wehen I run scons -j 2 build
I still see that they are build in parallel
Cheers
Erik
On Mon, 29 Jun 2020 at 00:24, Bill Deegan <bill at baddogconsulting.com> wrote:
> Erik
>
> If you have N compile (not link) steps and you want M of them to build
> singularly, using sideffect's only on the M will only affect the M
> compiling in parallel and not the N-M remaining compilations.
> Is that what you're shooting for?
>
> -Bill
>
> On Sun, Jun 28, 2020 at 11:36 AM Andrew C. Morrow <
> andrew.c.morrow at gmail.com> wrote:
>
>>
>> Hi Erik -
>>
>> You may be able to formulate something analogous to the MongoDB --jlink
>> feature:
>> https://github.com/mongodb/mongo/blob/539414b9cb7a9f39856090730398d5dd130ab0c8/SConstruct#L4430-L4471
>>
>> It uses SideEffect to constrain the concurrency of link tasks to a user
>> selected value.
>>
>> Longer term, I think having SCons implement support for job pools would
>> be a good idea.
>>
>> Thanks,
>> Andrew
>>
>>
>> On Fri, Jun 26, 2020 at 1:00 PM Bill Deegan <bill at baddogconsulting.com>
>> wrote:
>>
>>> Erik,
>>>
>>> So you'd like a way to mark one (or several) c++ files to be compiled
>>> with no parallel jobs?
>>>
>>> -Bill
>>>
>>> On Fri, Jun 26, 2020 at 5:44 AM Mats Wichmann <mats at wichmann.us> wrote:
>>>
>>>> On 6/26/20 6:12 AM, Erik Kazandjian wrote:
>>>> > Hi,
>>>> >
>>>> > I have the following issue. In my current project there is some
>>>> template
>>>> > stuff going on which makes g++ going ballistic. If I run scons -j 6 my
>>>> > machine hangs if it happens to be compiling these 6 expensive files in
>>>> > parallel because the system runs out of memory. Is there a way to tell
>>>> > scons not to build any of these files in parallel ?
>>>>
>>>> https://scons.org/doc/production/HTML/scons-man.html#f-SideEffect
>>>>
>>>> The manpage isn't terribly verbose on this, there's also a wiki page but
>>>> all it really adds is examples:
>>>>
>>>> https://github.com/SCons/scons/wiki/SideEffect
>>>> _______________________________________________
>>>> Scons-users mailing list
>>>> Scons-users at scons.org
>>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>>
>>> _______________________________________________
>>> Scons-users mailing list
>>> Scons-users at scons.org
>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20200629/3a7191ec/attachment.html>
More information about the Scons-users
mailing list