|
1 | 1 | diff --git a/cmake/modules/AddSwift.cmake b/cmake/modules/AddSwift.cmake |
2 | | -index 58c7eb1bd4f..da56fbb1c20 100644 |
| 2 | +index 58c7eb1bd4f..4f4d5b7edea 100644 |
3 | 3 | --- a/cmake/modules/AddSwift.cmake |
4 | 4 | +++ b/cmake/modules/AddSwift.cmake |
5 | | -@@ -918,11 +918,17 @@ function(add_swift_host_tool executable) |
6 | | - set(extra_relative_rpath "../") |
| 5 | +@@ -912,17 +912,22 @@ function(add_swift_host_tool executable) |
| 6 | + endif() |
| 7 | + |
| 8 | + if(SWIFT_SWIFT_PARSER) |
| 9 | +- set(extra_relative_rpath "") |
| 10 | +- if(NOT ${ASHT_BOOTSTRAPPING} STREQUAL "") |
| 11 | +- if (${executable} MATCHES "-bootstrapping") |
| 12 | +- set(extra_relative_rpath "../") |
| 13 | ++ if (SWIFT_HOST_VARIANT_SDK STREQUAL LINUX) |
| 14 | ++ if(NOT ${ASHT_BOOTSTRAPPING} STREQUAL "" AND ${executable} MATCHES "-bootstrapping") |
| 15 | ++ set_property(TARGET ${executable} APPEND PROPERTY INSTALL_RPATH "$ORIGIN/../../lib/swift/host") |
| 16 | ++ else() |
| 17 | ++ set_property(TARGET ${executable} APPEND PROPERTY INSTALL_RPATH "$ORIGIN/../lib/swift/host") |
| 18 | ++ endif() |
| 19 | ++ else() |
| 20 | ++ set(extra_relative_rpath "") |
| 21 | ++ if(NOT ${ASHT_BOOTSTRAPPING} STREQUAL "" AND ${executable} MATCHES "-bootstrapping") |
| 22 | ++ set(extra_relative_rpath "../") |
7 | 23 | endif() |
| 24 | ++ set_property( |
| 25 | ++ TARGET ${executable} |
| 26 | ++ APPEND PROPERTY INSTALL_RPATH |
| 27 | ++ "@executable_path/../${extra_relative_rpath}lib/swift/host") |
8 | 28 | endif() |
9 | 29 | - |
10 | 30 | - set_property( |
11 | 31 | - TARGET ${executable} |
12 | 32 | - APPEND PROPERTY INSTALL_RPATH |
13 | 33 | - "@executable_path/../${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() |
25 | 34 | endif() |
26 | 35 |
|
27 | 36 | if(ASHT_THINLTO_LD64_ADD_FLTO_CODEGEN_ONLY) |
|
0 commit comments