From fa90dbbd5eb976a4d777af9d143416f6b6f4a2ae Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 3 Dec 2019 02:35:23 +0300 Subject: [PATCH] wscript: fix sanitize build --- wscript | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index 934ff92e..f809523b 100644 --- a/wscript +++ b/wscript @@ -226,6 +226,7 @@ def configure(conf): } compiler_optional_flags = [ +# '-Wall', '-Wextra', '-Wpedantic', '-fdiagnostics-color=always', '-Werror=return-type', '-Werror=parentheses', @@ -281,8 +282,12 @@ def configure(conf): # And here C++ flags starts to be treated separately cxxflags = list(cflags) if conf.env.COMPILER_CC != 'msvc': - conf.check_cc(cflags=cflags, msg= 'Checking for required C flags') - conf.check_cxx(cxxflags=cflags, msg= 'Checking for required C++ flags') + conf.check_cc(cflags=cflags, linkflags=linkflags, msg= 'Checking for required C flags') + conf.check_cxx(cxxflags=cflags, linkflags=linkflags, msg= 'Checking for required C++ flags') + + conf.env.append_unique('CFLAGS', cflags) + conf.env.append_unique('CXXFLAGS', cxxflags) + conf.env.append_unique('LINKFLAGS', linkflags) cxxflags += conf.filter_cxxflags(compiler_optional_flags, cflags) cflags += conf.filter_cflags(compiler_optional_flags + c_compiler_optional_flags, cflags)