~ruther/guix-local

ref: 25e2662e7e65db2d2c3f9479a352e3507bcb46e9 guix-local/gnu/packages/patches/swift-5.7.3-sourcekit-rpath.patch -rw-r--r-- 934 bytes
25e2662e — Maxim Cournoyer gnu: dhtnet: Update to 0.0.1-6.6dd5a5e and enable natpmp support. 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}")