[Openmp-commits] [PATCH] D115198: [OpenMP][libomptarget] amdgpu plugin adds runpath for dependencies

Ye Luo via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Dec 6 15:55:27 PST 2021


ye-luo created this revision.
Herald added subscribers: kerbowa, guansong, t-tye, tpr, dstuttard, yaxunl, mgorny, nhaehnle, jvesely, kzhuravl.
ye-luo requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1, wdng.
Herald added a reviewer: jdoerfert.
Herald added a project: OpenMP.

amdgpu plugin depends on libhsa-runtime64 library. Add runpath in case it is not only the LD_LIBRARY_PATH.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115198

Files:
  openmp/libomptarget/plugins/amdgpu/CMakeLists.txt


Index: openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
===================================================================
--- openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
+++ openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
@@ -81,6 +81,7 @@
 # Install plugin under the lib destination folder.
 # When we build for debug, OPENMP_LIBDIR_SUFFIX get set to -debug
 install(TARGETS omptarget.rtl.amdgpu LIBRARY DESTINATION "lib${OPENMP_LIBDIR_SUFFIX}")
+set_property(TARGET omptarget.rtl.amdgpu PROPERTY INSTALL_RPATH_USE_LINK_PATH ON)
 
 if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
   # On FreeBSD, the 'environ' symbol is undefined at link time, but resolved by
@@ -91,7 +92,6 @@
   set(LDFLAGS_UNDEFINED "-Wl,-z,defs")
 endif()
 
-set_property(TARGET omptarget.rtl.amdgpu PROPERTY INSTALL_RPATH "$ORIGIN")
 target_link_libraries(
   omptarget.rtl.amdgpu
   PRIVATE


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115198.392213.patch
Type: text/x-patch
Size: 869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211206/ccc7d727/attachment.bin>


More information about the Openmp-commits mailing list