[Openmp-commits] [PATCH] D130825: [openmp] [test] Fix prepending config.library_dir to LD_LIBRARY_PATH

Michał Górny via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 1 09:54:18 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGeb4612ca239b: [openmp] [test] Fix prepending config.library_dir to LD_LIBRARY_PATH (authored by mgorny).
Herald added a project: OpenMP.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130825/new/

https://reviews.llvm.org/D130825

Files:
  openmp/runtime/test/lit.cfg


Index: openmp/runtime/test/lit.cfg
===================================================================
--- openmp/runtime/test/lit.cfg
+++ openmp/runtime/test/lit.cfg
@@ -11,7 +11,7 @@
     config = object()
     lit_config = object()
 
-def append_dynamic_library_path(path):
+def prepend_dynamic_library_path(path):
     if config.operating_system == 'Windows':
         name = 'PATH'
         sep = ';'
@@ -65,10 +65,13 @@
     config.available_features.add(feature)
 
 # Setup environment to find dynamic library at runtime
-append_dynamic_library_path(config.library_dir)
 if config.using_hwloc:
-    append_dynamic_library_path(config.hwloc_library_dir)
+    prepend_dynamic_library_path(config.hwloc_library_dir)
     config.available_features.add('hwloc')
+# Note: please keep config.library_dir *after* any potentially system
+# directories, as otherwise preinstalled openmp libraries will be used
+# over just-built
+prepend_dynamic_library_path(config.library_dir)
 
 # Rpath modifications for Darwin
 if config.operating_system == 'Darwin':


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130825.449055.patch
Type: text/x-patch
Size: 1053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220801/ad2422b2/attachment-0001.bin>


More information about the Openmp-commits mailing list