solver: test that we can build llvm%gcc
This commit is contained in:
parent
da916a944e
commit
922b9b0e50
@ -748,6 +748,7 @@ do_not_impose(EffectID, node(X, Package))
|
|||||||
explicitly_requested_root(PossibleProvider),
|
explicitly_requested_root(PossibleProvider),
|
||||||
not self_build_requirement(PossibleProvider, ProviderNode),
|
not self_build_requirement(PossibleProvider, ProviderNode),
|
||||||
not explicitly_requested_root(ProviderNode),
|
not explicitly_requested_root(ProviderNode),
|
||||||
|
not language(Virtual),
|
||||||
internal_error("If a root can provide a virtual, it must be the provider").
|
internal_error("If a root can provide a virtual, it must be the provider").
|
||||||
|
|
||||||
% A package cannot be the actual provider for a virtual if it does not
|
% A package cannot be the actual provider for a virtual if it does not
|
||||||
|
@ -3214,3 +3214,13 @@ def test_compiler_attribute_is_tolerated_in_externals(mutable_config, mock_packa
|
|||||||
mutable_config.set("packages", packages_yaml["packages"])
|
mutable_config.set("packages", packages_yaml["packages"])
|
||||||
s = spack.concretize.concretize_one("cmake")
|
s = spack.concretize.concretize_one("cmake")
|
||||||
assert s.external and s.external_path == str(tmp_path)
|
assert s.external and s.external_path == str(tmp_path)
|
||||||
|
|
||||||
|
|
||||||
|
def test_compiler_can_be_built_with_other_compilers(config, mock_packages):
|
||||||
|
"""Tests that a compiler can be built also with another compiler."""
|
||||||
|
s = Spec("llvm@18 +clang %gcc").concretized()
|
||||||
|
print(s.tree())
|
||||||
|
assert s.satisfies("llvm@18")
|
||||||
|
|
||||||
|
c_compiler = s.dependencies(virtuals=("c",))
|
||||||
|
assert len(c_compiler) == 1 and c_compiler[0].satisfies("gcc@10")
|
||||||
|
@ -80,7 +80,6 @@ packages:
|
|||||||
cxx: /path/bin/g++-10
|
cxx: /path/bin/g++-10
|
||||||
fortran: /path/bin/gfortran-10
|
fortran: /path/bin/gfortran-10
|
||||||
llvm:
|
llvm:
|
||||||
buildable: false
|
|
||||||
externals:
|
externals:
|
||||||
- spec: "llvm@15.0.0 +clang os={linux_os.name}{linux_os.version} target={target}"
|
- spec: "llvm@15.0.0 +clang os={linux_os.name}{linux_os.version} target={target}"
|
||||||
prefix: /path
|
prefix: /path
|
||||||
|
@ -45,7 +45,7 @@ def mpileaks_possible_deps(mock_packages, mpi_names, compiler_names):
|
|||||||
"intel-parallel-studio": set(),
|
"intel-parallel-studio": set(),
|
||||||
"libdwarf": set(["libelf"] + compiler_names),
|
"libdwarf": set(["libelf"] + compiler_names),
|
||||||
"libelf": set(compiler_names),
|
"libelf": set(compiler_names),
|
||||||
"llvm": set(),
|
"llvm": {"gcc", "llvm"},
|
||||||
"mpich": set(compiler_names),
|
"mpich": set(compiler_names),
|
||||||
"mpich2": set(compiler_names),
|
"mpich2": set(compiler_names),
|
||||||
"mpileaks": set(["callpath"] + mpi_names + compiler_names),
|
"mpileaks": set(["callpath"] + mpi_names + compiler_names),
|
||||||
|
@ -19,6 +19,8 @@ class Llvm(Package, CompilerPackage):
|
|||||||
|
|
||||||
provides("c", "cxx", when="+clang")
|
provides("c", "cxx", when="+clang")
|
||||||
|
|
||||||
|
depends_on("c")
|
||||||
|
|
||||||
c_names = ["clang"]
|
c_names = ["clang"]
|
||||||
cxx_names = ["clang++"]
|
cxx_names = ["clang++"]
|
||||||
fortran_names = ["flang"]
|
fortran_names = ["flang"]
|
||||||
|
Loading…
Reference in New Issue
Block a user