Skip to content

Commit 7818c62

Browse files
authored
Merge pull request swiftlang#2018 from JDevlieghere/swift_compiler
[lldb] Pass --swift-compiler in lldb-dotest
2 parents 1ddf96c + 6f82cde commit 7818c62

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lldb/utils/lldb-dotest/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ if(LLDB_BUILT_STANDALONE)
3030
string(REPLACE ${LLVM_RUNTIME_OUTPUT_INTDIR} ${config_runtime_output_dir} LLDB_TEST_FILECHECK_CONFIGURED "${LLDB_TEST_FILECHECK}")
3131
string(REPLACE ${LLVM_RUNTIME_OUTPUT_INTDIR} ${config_runtime_output_dir} LLDB_TEST_YAML2OBJ_CONFIGURED "${LLDB_TEST_YAML2OBJ}")
3232
string(REPLACE ${LLVM_RUNTIME_OUTPUT_INTDIR} ${config_runtime_output_dir} LLDB_TEST_SERVER_CONFIGURED "${LLDB_TEST_SERVER}")
33+
string(REPLACE ${LLVM_RUNTIME_OUTPUT_INTDIR} ${config_runtime_output_dir} LLDB_SWIFTC_CONFIGURED "${LLDB_SWIFTC}")
3334

3435
# Remaining ones must be paths to the provided LLVM build-tree.
3536
if(${config_type} IN_LIST LLVM_CONFIGURATION_TYPES)
@@ -46,6 +47,7 @@ if(LLDB_BUILT_STANDALONE)
4647
string(REPLACE ${CMAKE_CFG_INTDIR} ${config_type} LLDB_TEST_YAML2OBJ_CONFIGURED "${LLDB_TEST_YAML2OBJ}")
4748
string(REPLACE ${CMAKE_CFG_INTDIR} ${config_type} LLDB_TEST_SERVER_CONFIGURED "${LLDB_TEST_SERVER}")
4849
string(REPLACE ${CMAKE_CFG_INTDIR} ${config_type} LLDB_LIBS_DIR_CONFIGURED "${LLDB_LIBS_DIR}")
50+
string(REPLACE ${CMAKE_CFG_INTDIR} ${config_type} LLDB_SWIFTC_CONFIGURED "${LLDB_SWIFTC}")
4951
else()
5052
# Single-configuration generator like Ninja.
5153
string(REPLACE ${CMAKE_CFG_INTDIR} "." LLDB_DOTEST_ARGS_CONFIGURED "${LLDB_DOTEST_ARGS}")
@@ -60,6 +62,7 @@ if(LLDB_BUILT_STANDALONE)
6062
string(REPLACE ${CMAKE_CFG_INTDIR} "." LLDB_TEST_YAML2OBJ_CONFIGURED "${LLDB_TEST_YAML2OBJ}")
6163
string(REPLACE ${CMAKE_CFG_INTDIR} "." LLDB_TEST_SERVER_CONFIGURED "${LLDB_TEST_SERVER}")
6264
string(REPLACE ${CMAKE_CFG_INTDIR} "." LLDB_LIBS_DIR_CONFIGURED "${LLDB_LIBS_DIR}")
65+
string(REPLACE ${CMAKE_CFG_INTDIR} "." LLDB_SWIFTC_CONFIGURED "${LLDB_SWIFTC}")
6366
endif()
6467

6568
configure_file(
@@ -82,6 +85,7 @@ elseif(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
8285
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_TEST_YAML2OBJ_CONFIGURED "${LLDB_TEST_YAML2OBJ}")
8386
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_TEST_SERVER_CONFIGURED "${LLDB_TEST_SERVER}")
8487
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_LIBS_DIR_CONFIGURED "${LLDB_LIBS_DIR}")
88+
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_SWIFTC_CONFIGURED "${LLDB_SWIFTC}")
8589

8690
configure_file(
8791
lldb-dotest.in
@@ -101,6 +105,7 @@ else()
101105
set(LLDB_TEST_YAML2OBJ_CONFIGURED "${LLDB_TEST_YAML2OBJ}")
102106
set(LLDB_TEST_SERVER_CONFIGURED "${LLDB_TEST_SERVER}")
103107
set(LLDB_LIBS_DIR_CONFIGURED "${LLDB_LIBS_DIR}")
108+
set(LLDB_SWIFTC_CONFIGURED "${LLDB_SWIFTC}")
104109

105110
configure_file(
106111
lldb-dotest.in

lldb/utils/lldb-dotest/lldb-dotest.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ dotest_args_str = '@LLDB_DOTEST_ARGS_CONFIGURED@'
77
arch = '@LLDB_TEST_ARCH@'
88
executable = '@LLDB_TEST_EXECUTABLE_CONFIGURED@'
99
compiler = '@LLDB_TEST_COMPILER_CONFIGURED@'
10+
swift_compiler = '@LLDB_SWIFTC@'
1011
dsymutil = '@LLDB_TEST_DSYMUTIL_CONFIGURED@'
1112
filecheck = '@LLDB_TEST_FILECHECK_CONFIGURED@'
1213
yaml2obj = '@LLDB_TEST_YAML2OBJ_CONFIGURED@'
@@ -32,6 +33,8 @@ if __name__ == '__main__':
3233
cmd.extend(['--yaml2obj', yaml2obj])
3334
cmd.extend(['--filecheck', filecheck])
3435
cmd.extend(['--lldb-libs-dir', lldb_libs_dir])
36+
if swift_compiler:
37+
cmd.extend(['--swift-compiler', swift_compiler])
3538
if server:
3639
cmd.extend(['--server', server])
3740
if lldb_framework_dir:

0 commit comments

Comments
 (0)