diff options
author | David Robillard <d@drobilla.net> | 2020-07-06 10:34:56 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-07-06 11:03:55 +0200 |
commit | 9934934a070b138c9ff11dd821a755020c39eefa (patch) | |
tree | e48086ef31ce22d2933d3299ce6d54ebd128823e | |
parent | 9f17e7498c9527c85e292914f7e874c045dccc75 (diff) | |
download | serd-9934934a070b138c9ff11dd821a755020c39eefa.tar.gz serd-9934934a070b138c9ff11dd821a755020c39eefa.tar.bz2 serd-9934934a070b138c9ff11dd821a755020c39eefa.zip |
Update autowaf and be explicit about warning flags
m--------- | waflib | 0 | ||||
-rw-r--r-- | wscript | 47 |
2 files changed, 44 insertions, 3 deletions
diff --git a/waflib b/waflib -Subproject b6958e34a03488f5615c91c5e1e29c0085e324c +Subproject f773f9a6a1ace4e3ddda5db05db4fa49bd0173a @@ -44,14 +44,55 @@ def configure(conf): conf.load('autowaf', cache=True) autowaf.set_c_lang(conf, 'c99') - if Options.options.strict and not conf.env.MSVC_COMPILER: - conf.env.append_unique('CFLAGS', '-Wno-cast-align') - + if Options.options.strict: # Check for programs used by lint target conf.find_program("flake8", var="FLAKE8", mandatory=False) conf.find_program("clang-tidy", var="CLANG_TIDY", mandatory=False) conf.find_program("iwyu_tool", var="IWYU_TOOL", mandatory=False) + if Options.options.ultra_strict: + autowaf.add_compiler_flags(conf.env, '*', { + 'clang': [ + '-Wno-cast-align', + '-Wno-cast-qual', + '-Wno-covered-switch-default', + '-Wno-double-promotion', + '-Wno-format-nonliteral', + '-Wno-implicit-fallthrough', + '-Wno-padded', + '-Wno-reserved-id-macro', + '-Wno-sign-conversion', + '-Wno-switch-enum', + ], + 'gcc': [ + '-Wno-cast-align', + '-Wno-cast-qual', + '-Wno-padded', + '-Wno-sign-conversion', + '-Wno-switch-enum', + ], + 'msvc': [ + '/wd4061', # enumerator in switch is not explicitly handled + '/wd4365', # signed/unsigned mismatch + '/wd4514', # unreferenced inline function has been removed + '/wd4820', # padding added after construct + '/wd4996', # POSIX name for this item is deprecated + ], + }) + + autowaf.add_compiler_flags(conf.env, 'c', { + 'clang': [ + '-Wno-bad-function-cast', + ], + 'gcc': [ + '-Wno-bad-function-cast', + ], + 'msvc': [ + '/wd4706', # assignment within conditional expression + '/wd5045', # will insert Spectre mitigation for memory load + ], + }) + conf.env.update({ 'BUILD_UTILS': not Options.options.no_utils, 'BUILD_SHARED': not Options.options.no_shared, |