From 8d0ea1d03edbb4478ecb4e9374d3c5745df6b40a Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 9 Jul 2019 02:27:59 +0300 Subject: [PATCH] wscript: disallow int-conversion --- wscript | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/wscript b/wscript index f116a6e2..b8eaebd1 100644 --- a/wscript +++ b/wscript @@ -79,7 +79,7 @@ def configure(conf): # -march=native should not be used if conf.options.BUILD_TYPE == 'fast': - Logs.warn('WARNING: \'fast\' build type should not be used in release builds') + Logs.warn('WARNING: \'fast\' build type should not be used in release builds') conf.load('subproject') @@ -132,8 +132,20 @@ def configure(conf): 'common': { # disable thread-safe local static initialization for C++11 code, as it cause crashes on Windows XP 'msvc': ['/D_USING_V110_SDK71_', '/Zi', '/FS', '/Zc:threadSafeInit-', '/MT'], - 'clang': ['-g', '-gdwarf-2', '-Werror=implicit-function-declaration', '-Werror=return-type'], - 'gcc': ['-g', '-Werror=implicit-function-declaration', '-fdiagnostics-color=always', '-Werror=return-type'] + 'clang': [ + '-g', + '-gdwarf-2', + '-Werror=implicit-function-declaration', + '-Werror=return-type', + '-Werror=int-conversion' + ], + 'gcc': [ + '-g', + '-fdiagnostics-color=always', + '-Werror=implicit-function-declaration', + '-Werror=return-type', + '-Werror=int-conversion' + ] }, 'fast': { 'msvc': ['/O2', '/Oy'], #todo: check /GL /LTCG @@ -161,11 +173,11 @@ def configure(conf): } conf.env.append_unique('CFLAGS', conf.get_flags_by_type( - compiler_c_cxx_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)) + compiler_c_cxx_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)) conf.env.append_unique('CXXFLAGS', conf.get_flags_by_type( - compiler_c_cxx_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)) + compiler_c_cxx_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)) conf.env.append_unique('LINKFLAGS', conf.get_flags_by_type( - linker_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)) + linker_flags, conf.options.BUILD_TYPE, conf.env.COMPILER_CC)) conf.env.DEDICATED = conf.options.DEDICATED # we don't need game launcher on dedicated