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 5260acc53b
commit 5492b9cc6d
No known key found for this signature in database
GPG Key ID: 3E52BB992233066C
2 changed files with 10 additions and 6 deletions

View File

@ -3163,13 +3163,13 @@ def define_runtime_constraints(self):
"libc", "libc",
when=f"%{compiler.name}@{compiler.versions}", when=f"%{compiler.name}@{compiler.versions}",
type="link", type="link",
description="Add libc", description=f"Add libc when using {compiler}",
) )
recorder("*").depends_on( recorder("*").depends_on(
str(current_libc), str(current_libc),
when=f"%{compiler.name}@{compiler.versions}", when=f"%{compiler.name}@{compiler.versions}",
type="link", type="link",
description="Add libc", description=f"Libc is {current_libc} when using {compiler}",
) )
recorder.consume_facts() recorder.consume_facts()

View File

@ -1375,12 +1375,16 @@ node_target_compatible(PackageNode, Target)
#defined target_satisfies/2. #defined target_satisfies/2.
compiler(Compiler) :- compiler_supports_target(Compiler, _, _). compiler(Compiler) :- compiler_supports_target(Compiler, _, _).
% can't use targets on node if the compiler for the node doesn't support them % 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) 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("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), attr("version", node(Y, Compiler), Version),
compiler(Compiler), compiler(Compiler), language(Language),
not compiler_supports_target(Compiler, Version, Target), not compiler_supports_target(Compiler, Version, Target),
build(node(X, Package)). build(node(X, Package)).