aboutsummaryrefslogtreecommitdiff
path: root/test/Unit/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'test/Unit/lit.cfg')
-rw-r--r--test/Unit/lit.cfg18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/Unit/lit.cfg b/test/Unit/lit.cfg
index 794234ce5575..8f27781523f0 100644
--- a/test/Unit/lit.cfg
+++ b/test/Unit/lit.cfg
@@ -30,14 +30,6 @@ if 'TEMP' in os.environ:
###
-# If necessary, point the dynamic loader at libLLVM.so.
-if config.enable_shared:
- shlibpath = config.environment.get(config.shlibpath_var,'')
- if shlibpath:
- shlibpath = os.pathsep + shlibpath
- shlibpath = config.shlibdir + shlibpath
- config.environment[config.shlibpath_var] = shlibpath
-
# Check that the object root is known.
if config.test_exec_root is None:
# Otherwise, we haven't loaded the site specific configuration (the user is
@@ -71,7 +63,7 @@ if config.test_exec_root is None:
# Validate that we got a tree which points to here, using the standard
# tools/clang layout.
- this_src_root = os.path.dirname(config.test_source_root)
+ this_src_root = os.path.join(os.path.dirname(__file__),'..','..')
if os.path.realpath(clang_src_root) != os.path.realpath(this_src_root):
lit.fatal('No site specific configuration available!')
@@ -84,3 +76,11 @@ if config.test_exec_root is None:
lit.note('using out-of-tree build at %r' % clang_obj_root)
lit.load_config(config, site_cfg)
raise SystemExit
+
+# If necessary, point the dynamic loader at libLLVM.so.
+if config.enable_shared:
+ shlibpath = config.environment.get(config.shlibpath_var,'')
+ if shlibpath:
+ shlibpath = os.pathsep + shlibpath
+ shlibpath = config.shlibdir + shlibpath
+ config.environment[config.shlibpath_var] = shlibpath