[Openmp-commits] [PATCH] D124200: [Libomptarget][remote] Add OpenMP linker flag to the plugin

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


atmnpatel created this revision.
atmnpatel added a reviewer: jdoerfert.
Herald added subscribers: guansong, yaxunl, mgorny.
Herald added a project: All.
atmnpatel requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124200

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


Index: openmp/libomptarget/plugins/remote/src/CMakeLists.txt
===================================================================
--- openmp/libomptarget/plugins/remote/src/CMakeLists.txt
+++ openmp/libomptarget/plugins/remote/src/CMakeLists.txt
@@ -36,6 +36,7 @@
   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.
Index: openmp/libomptarget/plugins/remote/server/CMakeLists.txt
===================================================================
--- openmp/libomptarget/plugins/remote/server/CMakeLists.txt
+++ openmp/libomptarget/plugins/remote/server/CMakeLists.txt
@@ -28,4 +28,5 @@
         protobuf
         absl::synchronization
         ${OPENMP_PTHREAD_LIB}
+        omp
         "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/../../exports")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124200.424270.patch
Type: text/x-patch
Size: 912 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220421/2c9ef9db/attachment.bin>


More information about the Openmp-commits mailing list