Compare commits
1 Commits
develop-20
...
features/i
Author | SHA1 | Date | |
---|---|---|---|
![]() |
03084d2ff8 |
@@ -1800,8 +1800,9 @@ def target_defaults(self, specs):
|
|||||||
for target in candidate_targets:
|
for target in candidate_targets:
|
||||||
self.gen.fact(fn.target(target.name))
|
self.gen.fact(fn.target(target.name))
|
||||||
self.gen.fact(fn.target_family(target.name, target.family.name))
|
self.gen.fact(fn.target_family(target.name, target.family.name))
|
||||||
for parent in sorted(target.parents):
|
self.gen.fact(fn.target_compatible(target.name, target.name))
|
||||||
self.gen.fact(fn.target_parent(target.name, parent.name))
|
for ancestor in sorted(target.ancestors):
|
||||||
|
self.gen.fact(fn.target_compatible(target.name, ancestor.name))
|
||||||
|
|
||||||
# prefer best possible targets; weight others poorly so
|
# prefer best possible targets; weight others poorly so
|
||||||
# they're not used unless set explicitly
|
# they're not used unless set explicitly
|
||||||
|
@@ -816,18 +816,11 @@ node_target_compatible(Package, Target)
|
|||||||
:- attr("node_target", Package, MyTarget),
|
:- attr("node_target", Package, MyTarget),
|
||||||
target_compatible(Target, MyTarget).
|
target_compatible(Target, MyTarget).
|
||||||
|
|
||||||
% target_compatible(T1, T2) means code for T2 can run on T1
|
% NOTE: target_compatible(T1, T2) means code for T2 can run on T1
|
||||||
% This order is dependent -> dependency in the node DAG, which
|
% This order is dependent -> dependency in the node DAG, which
|
||||||
% is contravariant with the target DAG.
|
% is contravariant with the target DAG.
|
||||||
target_compatible(Target, Target) :- target(Target).
|
|
||||||
target_compatible(Child, Parent) :- target_parent(Child, Parent).
|
|
||||||
target_compatible(Descendent, Ancestor)
|
|
||||||
:- target_parent(Target, Ancestor),
|
|
||||||
target_compatible(Descendent, Target),
|
|
||||||
target(Target).
|
|
||||||
|
|
||||||
#defined target_satisfies/2.
|
#defined target_satisfies/2.
|
||||||
#defined target_parent/2.
|
|
||||||
|
|
||||||
% 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(2, "{0} compiler '{2}@{3}' incompatible with 'target={1}'", Package, Target, Compiler, Version)
|
error(2, "{0} compiler '{2}@{3}' incompatible with 'target={1}'", Package, Target, Compiler, Version)
|
||||||
|
Reference in New Issue
Block a user