waifulib: fwgslib: fix original list being changed

This commit is contained in:
Alibek Omarov 2019-10-11 07:56:44 +03:00
parent 319843917b
commit ea7da19a16
2 changed files with 7 additions and 11 deletions

View File

@ -51,11 +51,7 @@ def get_flags_by_type(flags, type, compiler):
def filter_flags(conf, flags, required_flags, checkfunc, checkarg, compiler):
conf.msg('Detecting supported flags for %s' % (compiler), '...')
check_flags = required_flags
if compiler != 'msvc':
check_flags += ['-Werror']
check_flags = required_flags + (['-Werror'] if compiler != 'msvc' else [])
supported_flags = []
for f in flags:
@ -64,7 +60,7 @@ def filter_flags(conf, flags, required_flags, checkfunc, checkarg, compiler):
fun = getattr(conf, 'check_' + checkfunc)
try:
fun(conf, **{ checkarg: [f] + check_flags})
fun(conf, **{ checkarg: [f] + check_flags })
except conf.errors.ConfigurationError:
conf.end_msg('no', color='YELLOW')
else:

10
waf-ext

File diff suppressed because one or more lines are too long