Scons: run `clang -Wall -fsyntax-only` in clang-analyze
The `clang -fsyntax-only` will give us additional warning messages in the console.
This commit is contained in:
parent
18692c29b8
commit
3b4f3f5931
|
@ -113,8 +113,11 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
|
|||
AS = 'true',)
|
||||
env["ENV"].update(x for x in os.environ.items() if x[0].startswith("CCC_"))
|
||||
# only check, don't compile. ccc-analyzer use CCC_CC as the CC.
|
||||
env['ENV']['CCC_CC'] = 'true'
|
||||
env['ENV']['CCC_CXX'] = 'true'
|
||||
# fsyntax-only will give us some additional warning messages
|
||||
env['ENV']['CCC_CC'] = 'clang'
|
||||
env.Append(CFLAGS=['-fsyntax-only', '-Wall', '-Wno-invalid-source-encoding'])
|
||||
env['ENV']['CCC_CXX'] = 'clang++'
|
||||
env.Append(CXXFLAGS=['-fsyntax-only', '-Wall', '-Wno-invalid-source-encoding'])
|
||||
# remove the POST_ACTION as it will cause meaningless errors(file not
|
||||
# found or something like that).
|
||||
rtconfig.POST_ACTION = ''
|
||||
|
|
Loading…
Reference in New Issue