Skip to content

lldb: Link swiftrt from the host toolchain on Windows #8683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lldb/source/Plugins/ExpressionParser/Swift/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,17 @@ if(BOOTSTRAPPING_MODE)
PRIVATE
swiftCompilerModules)

if (CMAKE_SYSTEM_NAME MATCHES "Linux|Android|OpenBSD|FreeBSD|Windows")
if (CMAKE_SYSTEM_NAME MATCHES "Linux|Android|OpenBSD|FreeBSD")
# The swiftCompilerModules need swiftrt to work properly.
string(REGEX MATCH "^[^-]*" arch ${LLVM_TARGET_TRIPLE})
string(TOLOWER ${CMAKE_SYSTEM_NAME} platform)
target_link_libraries(lldbPluginExpressionParserSwift
PRIVATE
"${LLDB_SWIFT_LIBS}/${platform}/${arch}/swiftrt${CMAKE_C_OUTPUT_EXTENSION}")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(swiftrt_obj
${SWIFT_PATH_TO_SWIFT_SDK}/usr/lib/swift/windows/${SWIFT_HOST_VARIANT_ARCH}/swiftrt${CMAKE_C_OUTPUT_EXTENSION})
target_link_libraries(lldbPluginExpressionParserSwift PRIVATE ${swiftrt_obj})
endif()
else()
target_link_libraries(lldbPluginExpressionParserSwift
Expand Down