wscript: disallow int-conversion

This commit is contained in:
Alibek Omarov 2019-07-09 02:27:59 +03:00
parent 83953c7fb3
commit 8d0ea1d03e
1 changed files with 18 additions and 6 deletions

24
wscript
View File

@ -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