scons: Don't pass a C++ compiler flag to C compilers
Needed since 0180a72573
introduces the
requirement of a C compiler in the building process. Otherwise we get
this from GCC 6.1.1:
cc1: error: command line option ‘-Wold-style-cast’ is valid for C++/ObjC++ but not for C [-Werror]
This commit is contained in:
parent
9c239d1fab
commit
2483fc80e4
1 changed files with 2 additions and 1 deletions
|
@ -512,7 +512,8 @@ for env in [test_env, campaignd_env, client_env, env]:
|
|||
env.AppendUnique(CXXFLAGS = ["-fopenmp"], LIBS = ["gomp"])
|
||||
|
||||
if env['strict']:
|
||||
env.AppendUnique(CCFLAGS = Split("-Werror -Wold-style-cast $(-Wno-unused-local-typedefs$)"))
|
||||
env.AppendUnique(CCFLAGS = Split("-Werror $(-Wno-unsused-local-typedefs$)"))
|
||||
env.AppendUnique(CXXFLAGS = Split("-Wold-style-cast"))
|
||||
if env['sanitize']:
|
||||
env.AppendUnique(CCFLAGS = ["-fsanitize=" + env["sanitize"]], LINKFLAGS = ["-fsanitize=" + env["sanitize"]])
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue