Skip to content

Commit 55928d3

Browse files
committed
Fix rpath on macOS
1 parent 6562df3 commit 55928d3

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

patches/swift/fix-linux-compilation-with-swift-parser.patch

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
diff --git a/cmake/modules/AddSwift.cmake b/cmake/modules/AddSwift.cmake
2-
index 58c7eb1bd4f..7d321882e8d 100644
2+
index 58c7eb1bd4f..da56fbb1c20 100644
33
--- a/cmake/modules/AddSwift.cmake
44
+++ b/cmake/modules/AddSwift.cmake
5-
@@ -922,7 +922,7 @@ function(add_swift_host_tool executable)
6-
set_property(
7-
TARGET ${executable}
8-
APPEND PROPERTY INSTALL_RPATH
5+
@@ -918,11 +918,17 @@ function(add_swift_host_tool executable)
6+
set(extra_relative_rpath "../")
7+
endif()
8+
endif()
9+
-
10+
- set_property(
11+
- TARGET ${executable}
12+
- APPEND PROPERTY INSTALL_RPATH
913
- "@executable_path/../${extra_relative_rpath}lib/swift/host")
10-
+ "$ORIGIN/../${extra_relative_rpath}lib/swift/host")
14+
+ if (SWIFT_HOST_VARIANT_SDK STREQUAL LINUX)
15+
+ set_property(
16+
+ TARGET ${executable}
17+
+ APPEND PROPERTY INSTALL_RPATH
18+
+ "$ORIGIN/../${extra_relative_rpath}lib/swift/host")
19+
+ else()
20+
+ set_property(
21+
+ TARGET ${executable}
22+
+ APPEND PROPERTY INSTALL_RPATH
23+
+ "@executable_path/../${extra_relative_rpath}lib/swift/host")
24+
+ endif()
1125
endif()
1226

1327
if(ASHT_THINLTO_LD64_ADD_FLTO_CODEGEN_ONLY)

0 commit comments

Comments
 (0)