diff options
author | Mario Melara <maamelara@gmail.com> | 2016-05-18 17:07:23 -0700 |
---|---|---|
committer | Mario Melara <maamelara@gmail.com> | 2016-05-18 17:07:23 -0700 |
commit | b4b794223065b3301da9f89eab536bf8d162c150 (patch) | |
tree | 2e6eba0324540eaef20bfa701b517c4faaaacc0a | |
parent | 9f8ff32bcce99c8a188f285e235e9c32ee245f97 (diff) | |
download | spack-b4b794223065b3301da9f89eab536bf8d162c150.tar.gz spack-b4b794223065b3301da9f89eab536bf8d162c150.tar.bz2 spack-b4b794223065b3301da9f89eab536bf8d162c150.tar.xz spack-b4b794223065b3301da9f89eab536bf8d162c150.zip |
Moved searching of flags into get compilers in compilers_for_spec
-rw-r--r-- | lib/spack/spack/compilers/__init__.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 000ef2058e..3432c142bf 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -254,17 +254,18 @@ def compilers_for_spec(compiler_spec, scope=None): else: operating_system = None - compilers.append(cls(cspec, operating_system, compiler_paths, mods, alias)) - -#ifdef NEW - flags = {} - for f in spack.spec.FlagMap.valid_compiler_flags(): - if f in items: - flags[f] = items[f] - return cls(cspec, *compiler_paths, **flags) -#else /* not NEW */ - return compilers -#endif /* not NEW */ + flags = {} + for f in spack.spec.FlagMap.valid_compiler_flags(): + if f in items: + flags[f] = items[f] + + compilers.append(cls(cspec, operating_system, compiler_paths, mods, alias, **flags)) + +##ifdef NEW +# return cls(cspec, *compiler_paths, **flags) +##else /* not NEW */ +# return compilers +##endif /* not NEW */ matches = set(find(compiler_spec, scope)) compilers = [] |