提交 3b4f3f59 编写于 作者: G Grissiom

Scons: run `clang -Wall -fsyntax-only` in clang-analyze

The `clang -fsyntax-only` will give us additional warning messages in
the console.
上级 18692c29
...@@ -113,8 +113,11 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ ...@@ -113,8 +113,11 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
AS = 'true',) AS = 'true',)
env["ENV"].update(x for x in os.environ.items() if x[0].startswith("CCC_")) 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. # only check, don't compile. ccc-analyzer use CCC_CC as the CC.
env['ENV']['CCC_CC'] = 'true' # fsyntax-only will give us some additional warning messages
env['ENV']['CCC_CXX'] = 'true' 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 # remove the POST_ACTION as it will cause meaningless errors(file not
# found or something like that). # found or something like that).
rtconfig.POST_ACTION = '' rtconfig.POST_ACTION = ''
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册