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

John Smith lbalbalba at gmail.com
Tue Oct 16 10:33:17 PDT 2012


On Tue, Oct 16, 2012 at 7:21 PM, Jordan Rose <jordan_rose at apple.com> wrote:
> 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
>
Hi,

Thanks for the response.

Sadly, I really dont know anything about scons (im just copying n
pasting creatively from the web here), but it looks like you cant
disable this clearing the env business. However, would something like
this be sufficient ? :

env["ENV"].update(x for x in os.environ.items() if x[0].startswith("CCC_"))


Regards,


John Smith.




More information about the cfe-dev mailing list