fwgslib: check flags in parallel. Remove prebuilt waf

This commit is contained in:
Alibek Omarov 2019-10-18 00:32:13 +03:00
parent e12bfc5112
commit 40bbcdf889
3 changed files with 16 additions and 363 deletions

View File

@ -48,30 +48,27 @@ def get_flags_by_type(flags, type, compiler):
return out return out
@Configure.conf @Configure.conf
def filter_flags(conf, flags, required_flags, checkfunc, checkarg, compiler): def filter_flags(conf, flags, required_flags, features, checkarg, compiler):
conf.msg('Detecting supported flags for %s' % (compiler), '...')
check_flags = required_flags + (['-Werror'] if compiler != 'msvc' else []) check_flags = required_flags + (['-Werror'] if compiler != 'msvc' else [])
supported_flags = [] tests = map(lambda x: {
'features': features,
for f in flags: 'compiler' : compiler,
conf.start_msg('Checking for %s' % f) 'msg': '... ' + x,
'define_name': Utils.quote_define_name(x),
fun = getattr(conf, 'check_' + checkfunc) checkarg: [x] + check_flags }, flags )
try: conf.env.stash()
fun(conf, **{ checkarg: [f] + check_flags }) conf.multicheck(*tests,
except conf.errors.ConfigurationError: msg = 'Checking supported flags for %s in parallel' % compiler,
conf.end_msg('no', color='YELLOW') mandatory = False)
else: supported_flags = [ f for f in flags if conf.env[Utils.quote_define_name(f)] ]
conf.end_msg('yes') conf.env.revert()
supported_flags.append(f)
return supported_flags return supported_flags
@Configure.conf @Configure.conf
def filter_cflags(conf, flags, required_flags = []): def filter_cflags(conf, flags, required_flags = []):
return conf.filter_flags(flags, required_flags, 'cc', 'cflags', conf.env.COMPILER_CC) return conf.filter_flags(flags, required_flags, 'c', 'cflags', conf.env.COMPILER_CC)
@Configure.conf @Configure.conf
def filter_cxxflags(conf, flags, required_flags = []): def filter_cxxflags(conf, flags, required_flags = []):

172
waf-ext

File diff suppressed because one or more lines are too long

172
waf-noext

File diff suppressed because one or more lines are too long