summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/package.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 6f90b3e162..b54a8abb74 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -1441,17 +1441,16 @@ class PackageBase(with_metaclass(PackageMeta, PackageViewMixin, object)):
dep_kwargs['explicit'] = False
dep_kwargs['install_deps'] = False
for dep in self.spec.traverse(order='post', root=False):
+ if spack.config.get('config:install_missing_compilers', False):
+ tty.debug('Bootstrapping {0} compiler for {1}'.format(
+ self.spec.compiler, self.name
+ ))
+ comp_kwargs = kwargs.copy()
+ comp_kwargs['explicit'] = False
+ comp_kwargs['install_deps'] = True
+ dep.package.bootstrap_compiler(**comp_kwargs)
dep.package.do_install(**dep_kwargs)
- # Then, install the compiler if it is not already installed.
- if install_deps:
- tty.debug('Boostrapping {0} compiler for {1}'.format(
- self.spec.compiler, self.name
- ))
- comp_kwargs = kwargs.copy()
- comp_kwargs['explicit'] = False
- self.bootstrap_compiler(**comp_kwargs)
-
# Then, install the package proper
tty.msg(colorize('@*{Installing} @*g{%s}' % self.name))