waifulib: fwgslib: fix original list being changed
This commit is contained in:
parent
319843917b
commit
ea7da19a16
@ -51,11 +51,7 @@ def get_flags_by_type(flags, type, compiler):
|
|||||||
def filter_flags(conf, flags, required_flags, checkfunc, checkarg, compiler):
|
def filter_flags(conf, flags, required_flags, checkfunc, checkarg, compiler):
|
||||||
conf.msg('Detecting supported flags for %s' % (compiler), '...')
|
conf.msg('Detecting supported flags for %s' % (compiler), '...')
|
||||||
|
|
||||||
check_flags = required_flags
|
check_flags = required_flags + (['-Werror'] if compiler != 'msvc' else [])
|
||||||
|
|
||||||
if compiler != 'msvc':
|
|
||||||
check_flags += ['-Werror']
|
|
||||||
|
|
||||||
supported_flags = []
|
supported_flags = []
|
||||||
|
|
||||||
for f in flags:
|
for f in flags:
|
||||||
@ -64,7 +60,7 @@ def filter_flags(conf, flags, required_flags, checkfunc, checkarg, compiler):
|
|||||||
fun = getattr(conf, 'check_' + checkfunc)
|
fun = getattr(conf, 'check_' + checkfunc)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
fun(conf, **{ checkarg: [f] + check_flags})
|
fun(conf, **{ checkarg: [f] + check_flags })
|
||||||
except conf.errors.ConfigurationError:
|
except conf.errors.ConfigurationError:
|
||||||
conf.end_msg('no', color='YELLOW')
|
conf.end_msg('no', color='YELLOW')
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user