Remove compiler flag propagation from concretize.lp
This commit is contained in:
parent
3c9bac5861
commit
177976b762
@ -1206,31 +1206,10 @@ same_compiler(PackageNode, DependencyNode)
|
|||||||
node_compiler(DependencyNode, CompilerID),
|
node_compiler(DependencyNode, CompilerID),
|
||||||
compiler_id(CompilerID).
|
compiler_id(CompilerID).
|
||||||
|
|
||||||
% propagate flags when compiler match
|
|
||||||
attr("node_flag_propagate", PackageNode, FlagType, Flag, Source) :- % source is a node() attribute
|
|
||||||
attr("node_flag_possible_prop", PackageNode, FlagType, Flag, Source),
|
|
||||||
not attr("node_flag_set", PackageNode, FlagType, _).
|
|
||||||
|
|
||||||
attr("node_flag_possible_prop", PackageNode, FlagType, Flag, Source) :- % source is a node() attribute
|
|
||||||
same_compiler(ParentNode, PackageNode),
|
|
||||||
attr("node_flag_possible_prop", ParentNode, FlagType, _, Source),
|
|
||||||
attr("node_flag", Source, FlagType, Flag),
|
|
||||||
flag_type(FlagType).
|
|
||||||
|
|
||||||
error(100, "{0} and {1} cannot both propagate compiler flags '{2}' to {3}", Source1, Source2, PackageNode, FlagType) :-
|
|
||||||
same_compiler(Source1, PackageNode),
|
|
||||||
same_compiler(Source2, PackageNode),
|
|
||||||
attr("node_flag_propagate", _, FlagType, _, Source1),
|
|
||||||
attr("node_flag_propagate", _, FlagType, _, Source2),
|
|
||||||
Source1 < Source2.
|
|
||||||
|
|
||||||
% remember where flags came from
|
% remember where flags came from
|
||||||
attr("node_flag_source", PackageNode, FlagType, PackageNode)
|
attr("node_flag_source", PackageNode, FlagType, PackageNode)
|
||||||
:- attr("node_flag_set", PackageNode, FlagType, _).
|
:- attr("node_flag_set", PackageNode, FlagType, _).
|
||||||
|
|
||||||
attr("node_flag_source", PackageNode, FlagType, Q)
|
|
||||||
:- attr("node_flag_propagate", PackageNode, FlagType, _, Q).
|
|
||||||
|
|
||||||
% compiler flags from compilers.yaml are put on nodes if compiler matches
|
% compiler flags from compilers.yaml are put on nodes if compiler matches
|
||||||
attr("node_flag", PackageNode, FlagType, Flag)
|
attr("node_flag", PackageNode, FlagType, Flag)
|
||||||
:- compiler_flag(CompilerID, FlagType, Flag),
|
:- compiler_flag(CompilerID, FlagType, Flag),
|
||||||
@ -1251,7 +1230,6 @@ attr("node_flag_compiler_default", PackageNode)
|
|||||||
|
|
||||||
% if a flag is set to something or inherited, it's included
|
% if a flag is set to something or inherited, it's included
|
||||||
attr("node_flag", PackageNode, FlagType, Flag) :- attr("node_flag_set", PackageNode, FlagType, Flag).
|
attr("node_flag", PackageNode, FlagType, Flag) :- attr("node_flag_set", PackageNode, FlagType, Flag).
|
||||||
attr("node_flag", PackageNode, FlagType, Flag) :- attr("node_flag_propagate", PackageNode, FlagType, Flag, _).
|
|
||||||
|
|
||||||
% if no node flags are set for a type, there are no flags.
|
% if no node flags are set for a type, there are no flags.
|
||||||
attr("no_flags", PackageNode, FlagType)
|
attr("no_flags", PackageNode, FlagType)
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
% TODO: Later
|
% TODO: Later
|
||||||
%=============================================================================
|
%=============================================================================
|
||||||
|
|
||||||
#program propagate_node_flag.
|
|
||||||
% propagate flags when compiler match
|
% propagate flags when compiler match
|
||||||
attr("node_flag_propagate", PackageNode, FlagType, Flag, Source) :- % source is a node() attribute
|
attr("node_flag_propagate", PackageNode, FlagType, Flag, Source) :- % source is a node() attribute
|
||||||
attr("node_flag_possible_prop", PackageNode, FlagType, Flag, Source),
|
attr("node_flag_possible_prop", PackageNode, FlagType, Flag, Source),
|
||||||
|
Loading…
Reference in New Issue
Block a user