[Openmp-commits] [PATCH] D109071: [libomptarget] Set runpath on libomptarget, use that to drop LD_LIBRARY_PATH from test runner
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Sep 1 10:48:06 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG718e5a9883eb: [libomptarget] Set runpath on libomptarget, use that to drop LD_LIBRARY_PATH… (authored by JonChesterfield).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109071/new/
https://reviews.llvm.org/D109071
Files:
openmp/libomptarget/src/CMakeLists.txt
openmp/libomptarget/test/lit.cfg
Index: openmp/libomptarget/test/lit.cfg
===================================================================
--- openmp/libomptarget/test/lit.cfg
+++ openmp/libomptarget/test/lit.cfg
@@ -85,11 +85,10 @@
config.test_flags += " -Wl,-rpath," + config.library_dir
config.test_flags += " -Wl,-rpath," + config.omp_host_rtl_directory
else: # Unices
- append_dynamic_library_path('LD_LIBRARY_PATH', config.library_dir, ":")
- append_dynamic_library_path('LD_LIBRARY_PATH', \
- config.omp_host_rtl_directory, ":")
+ config.test_flags += " -Wl,-rpath," + config.library_dir
+ config.test_flags += " -Wl,-rpath," + config.omp_host_rtl_directory
if config.cuda_libdir:
- append_dynamic_library_path('LD_LIBRARY_PATH', config.cuda_libdir, ":")
+ config.test_flags += " -Wl,-rpath," + config.cuda_libdir
append_dynamic_library_path('LIBRARY_PATH', config.library_dir, ":")
append_dynamic_library_path('LIBRARY_PATH', \
config.omp_host_rtl_directory, ":")
Index: openmp/libomptarget/src/CMakeLists.txt
===================================================================
--- openmp/libomptarget/src/CMakeLists.txt
+++ openmp/libomptarget/src/CMakeLists.txt
@@ -30,6 +30,7 @@
# Build libomptarget library with libdl dependency.
add_library(omptarget SHARED ${LIBOMPTARGET_SRC_FILES})
+set_target_properties(omptarget PROPERTIES INSTALL_RPATH "$ORIGIN" BUILD_RPATH "$ORIGIN")
if (OPENMP_ENABLE_LIBOMPTARGET_PROFILING)
# Add LLVMSupport dependency if profiling is enabled.
# Linking with LLVM component libraries also requires
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109071.369988.patch
Type: text/x-patch
Size: 1587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210901/1f21b9b1/attachment.bin>
More information about the Openmp-commits
mailing list