add hip-lang as a language virtual
This commit is contained in:
parent
1a57df46f6
commit
d17c118a78
@ -33,6 +33,7 @@ packages:
|
|||||||
glu: [mesa-glu, openglu]
|
glu: [mesa-glu, openglu]
|
||||||
golang: [go, gcc]
|
golang: [go, gcc]
|
||||||
go-or-gccgo-bootstrap: [go-bootstrap, gcc]
|
go-or-gccgo-bootstrap: [go-bootstrap, gcc]
|
||||||
|
hip-lang: [llvm-amdgpu]
|
||||||
iconv: [libiconv]
|
iconv: [libiconv]
|
||||||
ipp: [intel-oneapi-ipp]
|
ipp: [intel-oneapi-ipp]
|
||||||
java: [openjdk, jdk]
|
java: [openjdk, jdk]
|
||||||
|
@ -1421,6 +1421,7 @@ compiler(Compiler) :- compiler_supports_target(Compiler, _, _).
|
|||||||
language("c").
|
language("c").
|
||||||
language("cxx").
|
language("cxx").
|
||||||
language("fortran").
|
language("fortran").
|
||||||
|
language("hip-lang").
|
||||||
language_runtime("fortran-rt").
|
language_runtime("fortran-rt").
|
||||||
|
|
||||||
error(10, "Only external, or concrete, compilers are allowed for the {0} language", Language)
|
error(10, "Only external, or concrete, compilers are allowed for the {0} language", Language)
|
||||||
|
@ -59,6 +59,7 @@ class LlvmAmdgpu(CMakePackage, LlvmDetection, CompilerPackage):
|
|||||||
version("5.3.0", sha256="4e3fcddb5b8ea8dcaa4417e0e31a9c2bbdc9e7d4ac3401635a636df32905c93e")
|
version("5.3.0", sha256="4e3fcddb5b8ea8dcaa4417e0e31a9c2bbdc9e7d4ac3401635a636df32905c93e")
|
||||||
|
|
||||||
provides("c", "cxx")
|
provides("c", "cxx")
|
||||||
|
provides("hip-lang")
|
||||||
provides("fortran")
|
provides("fortran")
|
||||||
|
|
||||||
variant(
|
variant(
|
||||||
@ -372,3 +373,20 @@ def _cxx_path(self):
|
|||||||
|
|
||||||
def _fortran_path(self):
|
def _fortran_path(self):
|
||||||
return os.path.join(self.spec.prefix.bin, "amdflang")
|
return os.path.join(self.spec.prefix.bin, "amdflang")
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def runtime_constraints(cls, *, spec, pkg):
|
||||||
|
"""Callback function to inject runtime-related rules into the solver.
|
||||||
|
|
||||||
|
Rule-injection is obtained through method calls of the ``pkg`` argument.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
spec: spec that will inject runtime dependencies
|
||||||
|
pkg: object used to forward information to the solver
|
||||||
|
"""
|
||||||
|
pkg("*").depends_on(
|
||||||
|
"hip +rocm",
|
||||||
|
when="%[virtuals=hip-lang] llvm-amdgpu",
|
||||||
|
type="link",
|
||||||
|
description="If any package uses %llvm-amdgpu for hip-lang, it depends on hip",
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user