[Scons-users] scons and clang++

Florian Lindner mailinglists at xgm.de
Fri Jul 18 05:23:04 EDT 2014


Dirk Bächle wrote:

> Hi Florian,
> 
> On 18.07.2014 10:00, Florian Lindner wrote:
>> Gary Oberbrunner wrote:
>>
>>> There isn't any magic; it still seems to me likely it's something in
>>> your
>>> shell environment (not construction environment).  You're sure you did
>>> env['ENV'] = os.environ after constructing the environment?
>> This is the code I use http://pastebin.com/GrJ2SFTu
>>
>> I am currently trying it with env['ENV'] = os.environ but on production
>> code I rather want to keep it out to have a sane build environment.
> 
> I'm not a 100% sure, but I think the way you're setting the ENV var is a
> little too late. The dictionary of environment variables has to be
> available at the time when all the Tools are detected and
> configured...and this happens in the call of the Environment()
> constructor. So you should rather try:
> 
>    env = Environment(ENV = os.environ, variables = vars)
> 
> instead. If all you need is the "PATH" variable, you can use:
> 
>    env = Environment(ENV = {'PATH' : os.environ.get('PATH','')},
> variables = vars)

Isn't the point of calling env = conf.Finish() not to allow you to set all 
variables in env and test not before calling Finish()?

Right now it works without importing the entire environment. The only import 
I do is about $TERM. Since I do that only for compiler==clang++ it can't be 
done in constructor.

Regards,
Florian



More information about the Scons-users mailing list