diff options
Diffstat (limited to 'scons')
-rwxr-xr-x | scons/gallium.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scons/gallium.py b/scons/gallium.py index 42e8f7c547..e873c658ad 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -467,6 +467,18 @@ def generate(env): env.Append(CCFLAGS = ['/MT']) env.Append(SHCCFLAGS = ['/LD']) + # Static code analysis + if env['analyze']: + if env['msvc']: + # http://msdn.microsoft.com/en-us/library/ms173498.aspx + env.Append(CCFLAGS = [ + '/analyze', + #'/analyze:log', '${TARGET.base}.xml', + ]) + if env['clang']: + # scan-build will produce more comprehensive output + env.Append(CCFLAGS = ['--analyze']) + # Assembler options if gcc_compat: if env['machine'] == 'x86': |