Fix concretization of julia

That package depends on llvm as a library, and the rule on compatible
targets for compilers was getting in the way.
This commit is contained in:
Massimiliano Culpo 2024-11-14 10:22:54 +01:00
parent df464681bf
commit 2017dfea4c
No known key found for this signature in database
GPG Key ID: 3E52BB992233066C
2 changed files with 10 additions and 7 deletions

View File

@ -28,7 +28,6 @@
import spack.binary_distribution
import spack.compilers.config
import spack.compilers.flags
import spack.concretize
import spack.config
import spack.deptypes as dt
import spack.environment as ev
@ -2766,13 +2765,13 @@ def define_runtime_constraints(self):
"libc",
when=f"%{compiler.name}@{compiler.versions}",
type="link",
description="Add libc",
description=f"Add libc when using {compiler}",
)
recorder("*").depends_on(
str(current_libc),
when=f"%{compiler.name}@{compiler.versions}",
type="link",
description="Add libc",
description=f"Libc is {current_libc} when using {compiler}",
)
recorder.consume_facts()

View File

@ -1364,12 +1364,16 @@ node_target_compatible(PackageNode, Target)
#defined target_satisfies/2.
compiler(Compiler) :- compiler_supports_target(Compiler, _, _).
% can't use targets on node if the compiler for the node doesn't support them
error(100, "{0} compiler '{2}@{3}' incompatible with 'target={1}'", Package, Target, Compiler, Version)
% Can't use targets on node if the compiler for the node doesn't support them
language("c").
language("cxx").
language("fortran").
error(10, "{0} compiler '{2}@{3}' incompatible with 'target={1}'", Package, Target, Compiler, Version)
:- attr("node_target", node(X, Package), Target),
attr("depends_on", node(X, Package), node(Y, Compiler), "build"),
attr("virtual_on_edge", node(X, Package), node(Y, Compiler), Language),
attr("version", node(Y, Compiler), Version),
compiler(Compiler),
compiler(Compiler), language(Language),
not compiler_supports_target(Compiler, Version, Target),
build(node(X, Package)).