bugfix: fix install_missing_compilers option bug from v0.14.0 (#15416)
* bugfix: ensure bootstrapped compilers built before packages using the compiler
This commit is contained in:
parent
1e42f0a545
commit
ec720bf28d
1 changed files with 18 additions and 0 deletions
|
@ -181,6 +181,9 @@ def _packages_needed_to_bootstrap_compiler(pkg):
|
|||
# concrete CompilerSpec has less info than concrete Spec
|
||||
# concretize as Spec to add that information
|
||||
dep.concretize()
|
||||
# mark compiler as depended-on by the package that uses it
|
||||
dep._dependents[pkg.name] = spack.spec.DependencySpec(
|
||||
pkg.spec, dep, ('build',))
|
||||
packages = [(s.package, False) for
|
||||
s in dep.traverse(order='post', root=False)]
|
||||
packages.append((dep.package, True))
|
||||
|
@ -1610,6 +1613,21 @@ def __init__(self, pkg, compiler, start, attempts, status, installed):
|
|||
self.spec.dependencies() if
|
||||
package_id(d.package) != self.pkg_id)
|
||||
|
||||
# Handle bootstrapped compiler
|
||||
#
|
||||
# The bootstrapped compiler is not a dependency in the spec, but it is
|
||||
# a dependency of the build task. Here we add it to self.dependencies
|
||||
compiler_spec = self.spec.compiler
|
||||
arch_spec = self.spec.architecture
|
||||
if not spack.compilers.compilers_for_spec(compiler_spec,
|
||||
arch_spec=arch_spec):
|
||||
# The compiler is in the queue, identify it as dependency
|
||||
dep = spack.compilers.pkg_spec_for_compiler(compiler_spec)
|
||||
dep.architecture = arch_spec
|
||||
dep.concretize()
|
||||
dep_id = package_id(dep.package)
|
||||
self.dependencies.add(dep_id)
|
||||
|
||||
# List of uninstalled dependencies, which is used to establish
|
||||
# the priority of the build task.
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue