diff options
author | Mario Melara <maamelara@gmail.com> | 2016-05-26 11:09:14 -0700 |
---|---|---|
committer | Mario Melara <maamelara@gmail.com> | 2016-05-26 11:09:14 -0700 |
commit | 3b675d8b700369a5b5282e56ecaf6c559e592551 (patch) | |
tree | eaa59265e5a974d0c03d363f1b0f2fb76a407ad0 /lib | |
parent | c30fe932d96b4a6fbe8845a2f6bdbfb7567ab1d2 (diff) | |
download | spack-3b675d8b700369a5b5282e56ecaf6c559e592551.tar.gz spack-3b675d8b700369a5b5282e56ecaf6c559e592551.tar.bz2 spack-3b675d8b700369a5b5282e56ecaf6c559e592551.tar.xz spack-3b675d8b700369a5b5282e56ecaf6c559e592551.zip |
Changed comparison operator so that we don't get caught in an infinite loop
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/concretize.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 7a24c1135e..e30cf329f1 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -330,6 +330,8 @@ class DefaultConcretizer(object): compiler is used, defaulting to no compiler flags in the spec. Default specs set at the compiler level will still be added later. """ + + if not spec.architecture.platform_os: #Although this usually means changed, this means awaiting other changes return True @@ -340,9 +342,9 @@ class DefaultConcretizer(object): nearest = next(p for p in spec.traverse(direction='parents') if ((p.compiler == spec.compiler and p is not spec) and flag in p.compiler_flags)) - if ((not flag in spec.compiler_flags) or - sorted(spec.compiler_flags[flag]) != sorted(nearest.compiler_flags[flag])): - if flag in spec.compiler_flags: + if not flag in spec.compiler_flags or \ + not (sorted(spec.compiler_flags[flag]) >= sorted(nearest.compiler_flags[flag])): + if flag in spec.compiler_flag: spec.compiler_flags[flag] = list(set(spec.compiler_flags[flag]) | set(nearest.compiler_flags[flag])) else: |