@@ -30,14 +30,6 @@ if 'TEMP' in os.environ:
30
30
31
31
###
32
32
33
- # If necessary, point the dynamic loader at libLLVM.so.
34
- if config .enable_shared :
35
- shlibpath = config .environment .get (config .shlibpath_var ,'' )
36
- if shlibpath :
37
- shlibpath = os .pathsep + shlibpath
38
- shlibpath = config .shlibdir + shlibpath
39
- config .environment [config .shlibpath_var ] = shlibpath
40
-
41
33
# Check that the object root is known.
42
34
if config .test_exec_root is None :
43
35
# Otherwise, we haven't loaded the site specific configuration (the user is
@@ -71,7 +63,7 @@ if config.test_exec_root is None:
71
63
72
64
# Validate that we got a tree which points to here, using the standard
73
65
# tools/clang layout.
74
- this_src_root = os .path .dirname (config . test_source_root )
66
+ this_src_root = os .path .join ( os . path . dirname (__file__ ), '..' , '..' )
75
67
if os .path .realpath (clang_src_root ) != os .path .realpath (this_src_root ):
76
68
lit .fatal ('No site specific configuration available!' )
77
69
@@ -84,3 +76,11 @@ if config.test_exec_root is None:
84
76
lit .note ('using out-of-tree build at %r' % clang_obj_root )
85
77
lit .load_config (config , site_cfg )
86
78
raise SystemExit
79
+
80
+ # If necessary, point the dynamic loader at libLLVM.so.
81
+ if config .enable_shared :
82
+ shlibpath = config .environment .get (config .shlibpath_var ,'' )
83
+ if shlibpath :
84
+ shlibpath = os .pathsep + shlibpath
85
+ shlibpath = config .shlibdir + shlibpath
86
+ config .environment [config .shlibpath_var ] = shlibpath
0 commit comments