hipsycl: fix building on OSX. Patch boost to be backward-compatible. (#31311)

Co-authored-by: frobnitzem <frobnitzem@users.noreply.github.com>
This commit is contained in:
David M. Rogers 2022-08-30 04:22:34 -04:00 committed by GitHub
parent 3779e645b8
commit d75234b675
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,7 +132,9 @@ def filter_config_file(self):
# the libc++.so and libc++abi.so dyn linked to the sycl
# ptx backend
rpaths = set()
so_paths = filesystem.find(self.spec["llvm"].prefix, "libc++.so")
so_paths = filesystem.find_libraries(
"libc++", self.spec["llvm"].prefix, shared=True, recursive=True
)
if len(so_paths) != 1:
raise InstallError(
"concretized llvm dependency must provide a "
@ -140,11 +142,13 @@ def filter_config_file(self):
"found: {0}".format(so_paths)
)
rpaths.add(path.dirname(so_paths[0]))
so_paths = filesystem.find(self.spec["llvm"].prefix, "libc++abi.so")
so_paths = filesystem.find_libraries(
"libc++abi", self.spec["llvm"].prefix, shared=True, recursive=True
)
if len(so_paths) != 1:
raise InstallError(
"concretized llvm dependency must provide a "
"unique directory containing libc++abi.so, "
"unique directory containing libc++abi, "
"found: {0}".format(so_paths)
)
rpaths.add(path.dirname(so_paths[0]))