File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import tempfile
27
27
import socket
28
28
import glob
29
29
import pipes
30
+ from distutils .sysconfig import get_python_lib
30
31
31
32
import lit
32
33
import lit .formats
@@ -1068,3 +1069,10 @@ if os.path.exists(libswiftCore_path):
1068
1069
config .available_features .add ("static_stdlib" )
1069
1070
config .substitutions .append (('%target-static-stdlib-path' , static_stdlib_path ))
1070
1071
lit_config .note ('using static stdlib path: %s' % static_stdlib_path )
1072
+
1073
+ if config .lldb_build_root != "" :
1074
+ config .available_features .add ('lldb' )
1075
+ # Note: using the same approach to locating the lib dir as in
1076
+ # finishSwigPythonLLDB.py in the lldb repo
1077
+ python_lib_dir = get_python_lib (True , False , config .lldb_build_root )
1078
+ config .substitutions .append (('%lldb-python-path' , python_lib_dir ))
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ config.android_ndk_path = "@SWIFT_ANDROID_NDK_PATH@"
34
34
config .android_ndk_gcc_version = "@SWIFT_ANDROID_NDK_GCC_VERSION@"
35
35
36
36
config .coverage_mode = "@SWIFT_ANALYZE_CODE_COVERAGE@"
37
+ config .lldb_build_root = "@LLDB_BUILD_DIR@"
37
38
38
39
if "@SWIFT_ASAN_BUILD@" == "TRUE" :
39
40
config .available_features .add ("asan" )
@@ -79,13 +80,6 @@ if "@CMAKE_GENERATOR@" == "Xcode":
79
80
80
81
config .available_features .add ("CMAKE_GENERATOR=@CMAKE_GENERATOR@" )
81
82
82
- if "@LLDB_ENABLE@" == "TRUE" :
83
- config .available_features .add ('lldb' )
84
- for root , dirs , files in os .walk ("@LLDB_BUILD_DIR@" ):
85
- if root .endswith ("site-packages" ):
86
- config .substitutions .append (('%lldb-python-path' , root ))
87
- break
88
-
89
83
# Let the main config do the real work.
90
84
if config .test_exec_root is None :
91
85
config .test_exec_root = os .path .dirname (os .path .realpath (__file__ ))
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ config.android_ndk_path = "@SWIFT_ANDROID_NDK_PATH@"
32
32
config .android_ndk_gcc_version = "@SWIFT_ANDROID_NDK_GCC_VERSION@"
33
33
34
34
config .coverage_mode = "@SWIFT_ANALYZE_CODE_COVERAGE@"
35
+ config .lldb_build_root = "@LLDB_BUILD_DIR@"
35
36
36
37
if "@SWIFT_ASAN_BUILD@" == "TRUE" :
37
38
config .available_features .add ("asan" )
You can’t perform that action at this time.
0 commit comments