Skip to content

Commit 72369c8

Browse files
committed
lldb: Link swiftrt from the host toolchain on Windows
This is required for enabling SwiftCompilerSources for lldb on Windows
1 parent ceb203a commit 72369c8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lldb/source/Plugins/ExpressionParser/Swift/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,17 @@ if(BOOTSTRAPPING_MODE)
5050
PRIVATE
5151
swiftCompilerModules)
5252

53-
if (CMAKE_SYSTEM_NAME MATCHES "Linux|Android|OpenBSD|FreeBSD|Windows")
53+
if (CMAKE_SYSTEM_NAME MATCHES "Linux|Android|OpenBSD|FreeBSD")
5454
# The swiftCompilerModules need swiftrt to work properly.
5555
string(REGEX MATCH "^[^-]*" arch ${LLVM_TARGET_TRIPLE})
5656
string(TOLOWER ${CMAKE_SYSTEM_NAME} platform)
5757
target_link_libraries(lldbPluginExpressionParserSwift
5858
PRIVATE
5959
"${LLDB_SWIFT_LIBS}/${platform}/${arch}/swiftrt${CMAKE_C_OUTPUT_EXTENSION}")
60+
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
61+
set(swiftrt_obj
62+
${SWIFT_PATH_TO_SWIFT_SDK}/usr/lib/swift/windows/${SWIFT_HOST_VARIANT_ARCH}/swiftrt${CMAKE_C_OUTPUT_EXTENSION})
63+
target_link_libraries(lldbPluginExpressionParserSwift PRIVATE ${swiftrt_obj})
6064
endif()
6165
else()
6266
target_link_libraries(lldbPluginExpressionParserSwift

0 commit comments

Comments
 (0)