[Openmp-commits] [PATCH] D131507: [Libomptarget] Replace use of `dlopen` with LLVM's dynamic library support
Joseph Huber via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Aug 9 09:48:38 PDT 2022
jhuber6 created this revision.
jhuber6 added reviewers: jdoerfert, JonChesterfield, tianshilei1992, ronlieb.
Herald added subscribers: kosarev, kerbowa, pengfei, mgorny, jvesely.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added a project: OpenMP.
Herald added a subscriber: openmp-commits.
This patch replaces uses of `dlopen` and `dlsym` with LLVM's support
with `loadPermanentLibrary` and `getSymbolAddress`. This allows us to
remove the explicit dependency on the `dl` libraries in the CMake. This
removes another explicit dependency and solves an issue encountered
while building on Windows platforms. The one downside to this is that
the LLVM library does not currently support `dlclose` functionality, but
this could be added in the future.
NOTE: This does not implement the change for the `x86_64` plugin. it
requires using the raw handle to get the base address of the loaded
library.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D131507
Files:
openmp/libomptarget/include/rtl.h
openmp/libomptarget/plugins/CMakeLists.txt
openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa.cpp
openmp/libomptarget/plugins/cuda/CMakeLists.txt
openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp
openmp/libomptarget/src/CMakeLists.txt
openmp/libomptarget/src/rtl.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131507.451189.patch
Type: text/x-patch
Size: 17418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220809/d1ea456f/attachment-0001.bin>
More information about the Openmp-commits
mailing list