diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 32885062fd..b50ad02b07 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -225,7 +225,7 @@ def compiler_for_spec(compiler_spec, operating_system): be concrete.""" assert(compiler_spec.concrete) compilers = [c for c in compilers_for_spec(compiler_spec) - if c.strategy == operating_system.strategy] + if c.strategy == operating_system.compiler_strategy] if len(compilers) < 1: raise NoCompilerForSpecError(compiler_spec, target) if len(compilers) > 1: