LLVM: replace libelf dependency with elf (#34265)

* LLVM: replace libelf dependency with elf

I didn't test this extensively, but in CMS LLVM builds just fine with elfutils.

* [@spackbot] updating style on behalf of iarspider

Co-authored-by: iarspider <iarspider@users.noreply.github.com>
This commit is contained in:
iarspider 2022-12-17 23:44:27 +01:00 committed by GitHub
parent 1020b65297
commit 237d26460d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -236,7 +236,7 @@ class Llvm(CMakePackage, CudaPackage):
# openmp dependencies
depends_on("perl-data-dumper", type=("build"))
depends_on("hwloc")
depends_on("libelf", when="+cuda") # libomptarget
depends_on("elf", when="+cuda") # libomptarget
depends_on("libffi", when="+cuda") # libomptarget
# llvm-config --system-libs libraries.
@ -598,9 +598,7 @@ def cmake_args(self):
[
define("LIBOMPTARGET_NVPTX_ENABLE_BCLIB", True),
# work around bad libelf detection in libomptarget
define(
"LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR", spec["libelf"].prefix.include
),
define("LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR", spec["elf"].prefix.include),
]
)
else:
@ -737,9 +735,7 @@ def post_install(self):
cmake_args.extend(
[
define("LIBOMPTARGET_NVPTX_ENABLE_BCLIB", True),
define(
"LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR", spec["libelf"].prefix.include
),
define("LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR", spec["elf"].prefix.include),
self.stage.source_path + "/openmp",
]
)