[llvm] [offload][nfc] Extract libomptarget infrastructure into libompaccsupport (PR #213784)

Ivan R. Ivanov via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 05:31:09 PDT 2026


================
@@ -5,18 +5,20 @@ if(NOT TARGET "omp")
 endif()
 
 add_library(omptarget SHARED
-  device.cpp
   interface.cpp
   omptarget.cpp
-  OffloadRTL.cpp
   LegacyAPI.cpp
-  PluginManager.cpp
-  DeviceImage.cpp
 
   OpenMP/API.cpp
-  OpenMP/Mapping.cpp
   OpenMP/InteropAPI.cpp
-  OpenMP/OMPT/Callback.cpp
+
+  ../libompaccsupport/device.cpp
+  ../libompaccsupport/PluginManager.cpp
+  ../libompaccsupport/DeviceImage.cpp
+  ../libompaccsupport/OffloadRTL.cpp
+
+  ../libompaccsupport/Mapping.cpp
+  ../libompaccsupport/OMPT/Callback.cpp
----------------
ivanradanov wrote:

Thank you for the comments.

Initially I am planning for the OpenACC runtime to have no support for callbacks, until we set up (potentially shared?) infrastructure for handling it properly. From the OpenACC side I will be compiling the `libompaccsupport` files with no tools support (`OMPT_SUPPORT` undefined). I decided to move the `OMPT/Callbacks.cpp` because it is used in `device.cpp`, but now I realized it is entirely guarded by that macro, so we can leave it in OpenMP and only start iterating on the tools infrastructure once we start working in the OpenACC side tool callbacks.

I moved it back.

https://github.com/llvm/llvm-project/pull/213784


More information about the llvm-commits mailing list