~ruther/guix-local

ref: f3d2705f64ac3ef2dcdcd0d48eed413fb1fdab40 guix-local/gnu/packages/patches/swift-5.7.3-sourcekit-rpath.patch -rw-r--r-- 934 bytes
f3d2705f — Cayetano Santos gnu: ieee-p1076: Move to hdl. 30 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Author: Danny Milosavljevic  <dannym@friendly-machines.com>
Date: 2025-10-20
Subject: Set RPATH for SourceKit

Set RPATH for SourceKit shared libraries on Linux when BOOTSTRAPPING_MODE is not set.

Without this, libsourcekitdInProc.so has no RPATH and cannot find libdispatch.so
and libBlocksRuntime.so in lib/swift/linux/.

--- a/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
+++ b/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
@@ -227,6 +227,10 @@ macro(add_sourcekit_library name)

     if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
       set_target_properties(${name} PROPERTIES INSTALL_NAME_DIR "@rpath")
+    elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
+      if(NOT RPATH_LIST)
+        set(RPATH_LIST "$ORIGIN/swift/linux")
+      endif()
     endif()
     set_target_properties(${name} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
     set_target_properties(${name} PROPERTIES INSTALL_RPATH "${RPATH_LIST}")