Moved searching of flags into get compilers in compilers_for_spec

This commit is contained in:
Mario Melara 2016-05-18 17:07:23 -07:00
parent 9f8ff32bcc
commit b4b7942230

View File

@ -254,17 +254,18 @@ def get_compilers(cspec):
else: else:
operating_system = None operating_system = None
compilers.append(cls(cspec, operating_system, compiler_paths, mods, alias)) flags = {}
for f in spack.spec.FlagMap.valid_compiler_flags():
if f in items:
flags[f] = items[f]
#ifdef NEW compilers.append(cls(cspec, operating_system, compiler_paths, mods, alias, **flags))
flags = {}
for f in spack.spec.FlagMap.valid_compiler_flags(): ##ifdef NEW
if f in items: # return cls(cspec, *compiler_paths, **flags)
flags[f] = items[f] ##else /* not NEW */
return cls(cspec, *compiler_paths, **flags) # return compilers
#else /* not NEW */ ##endif /* not NEW */
return compilers
#endif /* not NEW */
matches = set(find(compiler_spec, scope)) matches = set(find(compiler_spec, scope))
compilers = [] compilers = []