~ruther/guix-local

ref: 64668f7c15fa639831209f25e313c99a1047de7b guix-local/gnu/packages/patches/swift-5.7.3-sourcekit-rpath.patch -rw-r--r-- 934 bytes
64668f7c — Rutherther etc: release: Add spare space to the release VM image. a month 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}")