[Openmp-commits] [openmp] c44420e - [Libomptarget][remote] Add OpenMP linker flag to the plugin

Atmn Patel via Openmp-commits openmp-commits at lists.llvm.org
Thu Apr 21 12:45:40 PDT 2022


Author: Atmn Patel
Date: 2022-04-21T15:45:29-04:00
New Revision: c44420e90d80063fc7cfc718ebe0d6b52e361e4e

URL: https://github.com/llvm/llvm-project/commit/c44420e90d80063fc7cfc718ebe0d6b52e361e4e
DIFF: https://github.com/llvm/llvm-project/commit/c44420e90d80063fc7cfc718ebe0d6b52e361e4e.diff

LOG: [Libomptarget][remote] Add OpenMP linker flag to the plugin

The remote offloading server and plugin rely on OpenMP, so this needs to be added as a linker flag. Without this, applications segfault.

Differential Revision: https://reviews.llvm.org/D124200

Added: 
    

Modified: 
    openmp/libomptarget/plugins/remote/server/CMakeLists.txt
    openmp/libomptarget/plugins/remote/src/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins/remote/server/CMakeLists.txt b/openmp/libomptarget/plugins/remote/server/CMakeLists.txt
index 3b25f122ac366..9712642509314 100644
--- a/openmp/libomptarget/plugins/remote/server/CMakeLists.txt
+++ b/openmp/libomptarget/plugins/remote/server/CMakeLists.txt
@@ -28,4 +28,5 @@ target_link_libraries(openmp-offloading-server
         protobuf
         absl::synchronization
         ${OPENMP_PTHREAD_LIB}
+        omp
         "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/../../exports")

diff  --git a/openmp/libomptarget/plugins/remote/src/CMakeLists.txt b/openmp/libomptarget/plugins/remote/src/CMakeLists.txt
index e0386c5dc47a1..6299fb38ee8b4 100644
--- a/openmp/libomptarget/plugins/remote/src/CMakeLists.txt
+++ b/openmp/libomptarget/plugins/remote/src/CMakeLists.txt
@@ -36,6 +36,7 @@ target_link_libraries(omptarget.rtl.rpc
   protobuf
   absl::synchronization
   ${OPENMP_PTHREAD_LIB}
+  omp
   "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/../../exports")
 
 # Report to the parent scope that we are building a plugin for RPC.


        


More information about the Openmp-commits mailing list