[Openmp-commits] [openmp] 21a51ce - [OpenMP][libomptarget] amdgpu plugin adds runpath for dependencies

Ye Luo via Openmp-commits openmp-commits at lists.llvm.org
Mon Dec 6 16:20:07 PST 2021


Author: Ye Luo
Date: 2021-12-06T18:19:18-06:00
New Revision: 21a51cebf1669293620f62f719ed02eb522de972

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

LOG: [OpenMP][libomptarget] amdgpu plugin adds runpath for dependencies

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

Reviewed By: JonChesterfield

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt b/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
index a2db745f71ae5..0e1ce2afd154e 100644
--- a/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
+++ b/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
@@ -81,6 +81,7 @@ add_library(omptarget.rtl.amdgpu SHARED
 # 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 @@ else()
   set(LDFLAGS_UNDEFINED "-Wl,-z,defs")
 endif()
 
-set_property(TARGET omptarget.rtl.amdgpu PROPERTY INSTALL_RPATH "$ORIGIN")
 target_link_libraries(
   omptarget.rtl.amdgpu
   PRIVATE


        


More information about the Openmp-commits mailing list