Skip to content
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

LLDB CMake: add option to link Swift content from Darwin toolchain #8647

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions lldb/cmake/modules/AddLLDB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@ function(add_properties_for_swift_modules target reldir)
APPEND PROPERTY BUILD_RPATH "@loader_path/${build_reldir}lib/swift/host")
set_property(TARGET ${target}
APPEND PROPERTY INSTALL_RPATH "@loader_path/${reldir}lib/swift/host")
if(SWIFT_ALLOW_LINKING_SWIFT_CONTENT_IN_DARWIN_TOOLCHAIN)
get_filename_component(TOOLCHAIN_BIN_DIR ${CMAKE_Swift_COMPILER} DIRECTORY)
get_filename_component(TOOLCHAIN_LIB_DIR "${TOOLCHAIN_BIN_DIR}/../lib/swift/macosx" ABSOLUTE)
target_link_directories(${target} BEFORE PUBLIC ${TOOLCHAIN_LIB_DIR})
endif()
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|Android|OpenBSD|FreeBSD")
set_property(TARGET ${target}
APPEND PROPERTY BUILD_RPATH "$ORIGIN/${build_reldir}lib/swift/host")
Expand Down