projects/guix·blob python-team · refs

22 lines · 934 B

1Author: Danny Milosavljevic <[email protected]>
2Date: 2025-10-20
3Subject: Set RPATH for SourceKit
4
5Set RPATH for SourceKit shared libraries on Linux when BOOTSTRAPPING_MODE is not set.
6
7Without this, libsourcekitdInProc.so has no RPATH and cannot find libdispatch.so
8and libBlocksRuntime.so in lib/swift/linux/.
9
10--- a/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
11+++ b/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
12@@ -227,6 +227,10 @@ macro(add_sourcekit_library name)
13
14 if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
15 set_target_properties(${name} PROPERTIES INSTALL_NAME_DIR "@rpath")
16+ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
17+ if(NOT RPATH_LIST)
18+ set(RPATH_LIST "$ORIGIN/swift/linux")
19+ endif()
20 endif()
21 set_target_properties(${name} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
22 set_target_properties(${name} PROPERTIES INSTALL_RPATH "${RPATH_LIST}")