Add CCE support to hipfort (#35609)

* Add CCE support to hipfort
* Update package.py
This commit is contained in:
luker 2023-02-22 12:59:54 -06:00 committed by GitHub
parent 3be9af8c13
commit 6ebf9f65c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,6 +97,8 @@ class Hipfort(CMakePackage):
depends_on("rocm-cmake@3.8.0:", type="build") depends_on("rocm-cmake@3.8.0:", type="build")
depends_on("binutils", when="%cce")
for ver in [ for ver in [
"3.8.0", "3.8.0",
"3.9.0", "3.9.0",
@ -131,4 +133,12 @@ def cmake_args(self):
if self.spec.satisfies("^cmake@3.21.0:3.21.2"): if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
args.append(self.define("__skip_rocmclang", "ON")) args.append(self.define("__skip_rocmclang", "ON"))
if self.spec.satisfies("%cce"):
args.append("-DHIPFORT_COMPILER={}".format(spack_fc))
args.append("-DHIPFORT_AR=" + join_path(self.spec["binutils"].prefix.bin, "ar"))
args.append(
"-DHIPFORT_RANLIB=" + join_path(self.spec["binutils"].prefix.bin, "ranlib")
)
args.append("-DHIPFORT_COMPILER_FLAGS='-ffree -eT'")
return args return args