[cfe-dev] trouble using scons with scan-build

Jordan Rose jordan_rose at apple.com
Tue Oct 16 10:21:18 PDT 2012


Hi, John. Unfortunately, there are a LOT more environment variables being set by scan-build besides just CC and CXX -- it's the only way scan-build has to communicate with the ccc-analyzer processes that get launched for each file that's built. Is there a way to disable this environment-clearing behavior for a certain build?

I think all of our environment variables start with "CCC_", so if you end up going the manual route you can just iterate through the whole environment and copy those over.

Best,
Jordan


On Oct 16, 2012, at 10:11 , John Smith <lbalbalba at gmail.com> wrote:

> Hi,
> 
> 
> Im trying to get scan-build to ruin with 'scons', but am running into
> some issues. 'scons' clears the environment on execution, so you have
> to explicitly import them again, by explicitly importing them at the
> top of 'SConstruct' :
> 
> import os
> 
> And then set the compiler in config.py :
> 
> env['CC'] = os.getenv("CC")
> env['CXX'] = os.getenv("CXX")
> 
> and then running
> 
> scan-build scons
> (which overrides CC and CXX)
> 
> 
> But in the screen output issues are reported, but they dont show up in
> the dir specified by '-o', and at the end of the compilation it says :
> 
> scan-build: Removing directory '/tmp/foo' because it contains no reports.
> 
> Even though I saw it report issues in the screen output.
> 
> I dont understand what is going on here ? Why are issues reported in
> the screen output, but are they not saved in the dir specified by -o ?
> 
> 
> 
> Regards,
> 
> 
> John Smith.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list