I’ve got a project built with SCons and I’m trying to use the Clang Static Analyzer to analyze the code. However, when running
scan-build scons
SCons seems to ignore the settings introduced by scan-build. How can I make this work?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The way
scan-buildworks is it sets up various environment variables that are usually used by build systems (such asmake) to control how the build happens. Some of these are:CC– name of program to use as C compilerCXX– name of program to use as C++ compilerCCC_*– various environment variables that control the behaviour of Clang’s static analyzerSCons normally cleans out the environment before running a build (this is a feature). In order to make the above environment variables take effect, do something like this in
SConstruct: