Skip to content
Merged
Show file tree
Hide file tree
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
15 changes: 11 additions & 4 deletions lldb/cmake/modules/AddLLDB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,17 @@ function(add_properties_for_swift_modules target reldir)
set_property(TARGET ${target} APPEND PROPERTY INSTALL_RPATH "${SWIFT_INSTALL_RPATH}")

if (SWIFT_SWIFT_PARSER)
set_property(TARGET ${target}
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 (CMAKE_SYSTEM_NAME MATCHES "Darwin")
set_property(TARGET ${target}
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")
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|Android|OpenBSD|FreeBSD")
set_property(TARGET ${target}
APPEND PROPERTY BUILD_RPATH "$ORIGIN/${build_reldir}lib/swift/host")
set_property(TARGET ${target}
APPEND PROPERTY INSTALL_RPATH "$ORIGIN/${reldir}lib/swift/host")
endif()
endif()
endif()
endfunction()
Expand Down
6 changes: 5 additions & 1 deletion lldb/source/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ endif()
# BEGIN Swift Mods
# Note that add_properties_for_swift_modules appends RPATHs so it's critical
# that this is called after lldb_setup_rpaths.
add_properties_for_swift_modules(liblldb "../../../../../../usr/" "../../../../")
if(LLDB_BUILD_FRAMEWORK)
add_properties_for_swift_modules(liblldb "../../../../../../usr/" "../../../../")
else()
add_properties_for_swift_modules(liblldb "../")
endif()
# END Swift Mods

if(LLDB_ENABLE_PYTHON)
Expand Down