Only specified compiler flag propagates
This commit is contained in:
parent
f0df745f54
commit
8897e1e11f
@ -1205,7 +1205,7 @@ attr("node_flag_propagate", Package, FlagType, Flag, Source) :-
|
|||||||
|
|
||||||
attr("node_flag_possible_prop", Package, FlagType, Flag, Source) :-
|
attr("node_flag_possible_prop", Package, FlagType, Flag, Source) :-
|
||||||
same_compiler(Parent, Package),
|
same_compiler(Parent, Package),
|
||||||
attr("node_flag_possible_prop", Parent, _, _, Source),
|
attr("node_flag_possible_prop", Parent, FlagType, _, Source),
|
||||||
attr("node_flag", Source, FlagType, Flag),
|
attr("node_flag", Source, FlagType, Flag),
|
||||||
flag_type(FlagType).
|
flag_type(FlagType).
|
||||||
|
|
||||||
|
@ -374,6 +374,16 @@ def test_concretize_propagate_compiler_flag_not_passed_to_dependent(self):
|
|||||||
assert spec.satisfies("^dyninst cflags='-O3'")
|
assert spec.satisfies("^dyninst cflags='-O3'")
|
||||||
assert spec.satisfies("^libelf cflags='-g'")
|
assert spec.satisfies("^libelf cflags='-g'")
|
||||||
|
|
||||||
|
@pytest.mark.only_clingo(
|
||||||
|
"Optional compiler propagation isn't deprecated for original concretizer"
|
||||||
|
)
|
||||||
|
def test_concretize_propagate_specified_compiler_flag(self):
|
||||||
|
spec = Spec("callpath cflags=='-g' cxxflags='-O3'")
|
||||||
|
spec.concretize()
|
||||||
|
|
||||||
|
assert spec.satisfies("^dyninst cflags='-g'")
|
||||||
|
assert not spec.satisfies("^dyninst cxxflags='-O3'")
|
||||||
|
|
||||||
def test_mixing_compilers_only_affects_subdag(self):
|
def test_mixing_compilers_only_affects_subdag(self):
|
||||||
spack.config.set("packages:all:compiler", ["clang", "gcc"])
|
spack.config.set("packages:all:compiler", ["clang", "gcc"])
|
||||||
spec = Spec("dt-diamond%gcc ^dt-diamond-bottom%clang").concretized()
|
spec = Spec("dt-diamond%gcc ^dt-diamond-bottom%clang").concretized()
|
||||||
|
Loading…
Reference in New Issue
Block a user