diff options
| author | Grissiom <[email protected]> | 2013-09-07 12:06:04 +0800 |
|---|---|---|
| committer | Grissiom <[email protected]> | 2013-09-07 15:15:47 +0800 |
| commit | 3b4f3f5931185ea3224e16430b75ae32ed1718b1 (patch) | |
| tree | ecc5414a30e747b2587430153275abf13d01b75d /tools | |
| parent | 18692c29b8d8a24dcd6710c4bea4339789c21c17 (diff) | |
Scons: run `clang -Wall -fsyntax-only` in clang-analyze
The `clang -fsyntax-only` will give us additional warning messages in
the console.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/building.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/building.py b/tools/building.py index 56b4ebdc8d..65bd14d882 100644 --- a/tools/building.py +++ b/tools/building.py @@ -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 = '' |
