33
33
'libclang_rt.asan_osx_dynamic.dylib' )
34
34
config .environment ['DYLD_INSERT_LIBRARIES' ] = runtime
35
35
36
+
36
37
def find_shlibpath_var ():
37
38
if platform .system () in ['Linux' , 'FreeBSD' , 'NetBSD' , 'SunOS' ]:
38
39
yield 'LD_LIBRARY_PATH'
@@ -41,6 +42,7 @@ def find_shlibpath_var():
41
42
elif platform .system () == 'Windows' :
42
43
yield 'PATH'
43
44
45
+
44
46
# Shared library build of LLVM may require LD_LIBRARY_PATH or equivalent.
45
47
if config .shared_libs :
46
48
for shlibpath_var in find_shlibpath_var ():
@@ -64,7 +66,7 @@ def find_shlibpath_var():
64
66
# lit.py invocation is close enough.
65
67
for cachedir in [config .clang_module_cache , config .lldb_module_cache ]:
66
68
if os .path .isdir (cachedir ):
67
- print ("Deleting module cache at %s." % cachedir )
69
+ print ("Deleting module cache at %s." % cachedir )
68
70
shutil .rmtree (cachedir )
69
71
70
72
# Set a default per-test timeout of 10 minutes. Setting a timeout per test
@@ -78,14 +80,9 @@ def find_shlibpath_var():
78
80
79
81
# Build dotest command.
80
82
dotest_cmd = [config .dotest_path ]
83
+ dotest_cmd += ['--arch' , config .test_arch ]
81
84
dotest_cmd .extend (config .dotest_args_str .split (';' ))
82
85
83
- # We don't want to force users passing arguments to lit to use `;` as a
84
- # separator. We use Python's simple lexical analyzer to turn the args into a
85
- # list.
86
- if config .dotest_lit_args_str :
87
- dotest_cmd .extend (shlex .split (config .dotest_lit_args_str ))
88
-
89
86
# Library path may be needed to locate just-built clang.
90
87
if config .llvm_libs_dir :
91
88
dotest_cmd += ['--env' , 'LLVM_LIBS_DIR=' + config .llvm_libs_dir ]
@@ -99,6 +96,26 @@ def find_shlibpath_var():
99
96
if config .clang_module_cache :
100
97
dotest_cmd += ['--clang-module-cache-dir' , config .clang_module_cache ]
101
98
99
+ if config .lldb_executable :
100
+ dotest_cmd += ['--executable' , config .lldb_executable ]
101
+
102
+ if config .test_compiler :
103
+ dotest_cmd += ['--compiler' , config .test_compiler ]
104
+
105
+ if config .dsymutil :
106
+ dotest_cmd += ['--dsymutil' , config .dsymutil ]
107
+
108
+ if config .filecheck :
109
+ dotest_cmd += ['--filecheck' , config .filecheck ]
110
+
111
+ # We don't want to force users passing arguments to lit to use `;` as a
112
+ # separator. We use Python's simple lexical analyzer to turn the args into a
113
+ # list. Pass there arguments last so they can override anything that was
114
+ # already configured.
115
+ if config .dotest_lit_args_str :
116
+ dotest_cmd .extend (shlex .split (config .dotest_lit_args_str ))
117
+
118
+
102
119
# Load LLDB test format.
103
120
sys .path .append (os .path .join (config .lldb_src_root , "test" , "API" ))
104
121
import lldbtest
0 commit comments