aboutsummaryrefslogtreecommitdiff
path: root/openmp/runtime/test/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/test/lit.cfg')
-rw-r--r--openmp/runtime/test/lit.cfg9
1 files changed, 6 insertions, 3 deletions
diff --git a/openmp/runtime/test/lit.cfg b/openmp/runtime/test/lit.cfg
index 76727f3ed528..b000787409ef 100644
--- a/openmp/runtime/test/lit.cfg
+++ b/openmp/runtime/test/lit.cfg
@@ -11,7 +11,7 @@ if 'PYLINT_IMPORT' in os.environ:
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 @@ for feature in config.test_compiler_features:
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':