Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

scons with distcc?

Tags:

scons

distcc

What's the correct way of using scons with distcc? The obvious way of using CC="distcc g++" or CXX doesn't work.

Did anyone ever succeed in combining the two?

Thanks!

like image 965
Protostome Avatar asked May 10 '26 16:05

Protostome


1 Answers

Have you configured CC or CXX via an environment variable? SCons doesn't pollute its default environment with variables from the calling environment. However, you may initialize the SCons environment from the OS environment (or preferably a subset of it):

import os
env = Environment(ENV = os.environ)
env.Program('yourprogram.cpp')

Alternatively, this could also work (haven't used SCons in a long time):

env = Environment(CXX='distcc g++')
env.Program('yourprogram.cpp')

Have a look at the man page for an overview of all the variables used in SCons.

like image 185
Pankrat Avatar answered May 14 '26 19:05

Pankrat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!