From 160e1226a34ab1bf2c24c8bcc2c503c6add9897d Mon Sep 17 00:00:00 2001 From: Evan Wilde Date: Wed, 21 May 2025 15:19:52 -0700 Subject: [PATCH] Pass platform name in SwiftCore link The platform name was hard-coded to `linux`. The target name when building for FreeBSD is `swiftCore-freebsd-${arch}` resulting in a build failure due to the missing swiftCore-linux-${arch} target. --- lldb/cmake/modules/AddLLDB.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake index c91b08f371112..af919f34f8d27 100644 --- a/lldb/cmake/modules/AddLLDB.cmake +++ b/lldb/cmake/modules/AddLLDB.cmake @@ -221,8 +221,8 @@ function(add_properties_for_swift_modules target reldir) set_property(TARGET ${target} APPEND PROPERTY INSTALL_RPATH "${SWIFT_INSTALL_RPATH}") elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|Android|OpenBSD|FreeBSD") string(REGEX MATCH "^[^-]*" arch ${LLVM_TARGET_TRIPLE}) - target_link_libraries(${target} PRIVATE swiftCore-linux-${arch}) string(TOLOWER ${CMAKE_SYSTEM_NAME} platform) + target_link_libraries(${target} PRIVATE swiftCore-${platform}-${arch}) set(SWIFT_BUILD_RPATH "${LLDB_SWIFT_LIBS}/${platform}") set(SWIFT_INSTALL_RPATH "$ORIGIN/${reldir}lib/swift/${platform}") set_property(TARGET ${target} APPEND PROPERTY BUILD_RPATH "${SWIFT_BUILD_RPATH}")