File tree 2 files changed +17
-6
lines changed 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -195,17 +195,24 @@ function(add_properties_for_swift_modules target reldir)
195
195
target_link_libraries (${target} PRIVATE swiftCore-linux-${arch} )
196
196
string (TOLOWER ${CMAKE_SYSTEM_NAME} platform)
197
197
set (SWIFT_BUILD_RPATH "${LLDB_SWIFT_LIBS} /${platform} " )
198
- set (SWIFT_INSTALL_RPATH "$ORIGIN/swift/${platform} " )
198
+ set (SWIFT_INSTALL_RPATH "$ORIGIN/${reldir} lib/ swift/${platform} " )
199
199
endif ()
200
200
201
201
set_property (TARGET ${target} APPEND PROPERTY BUILD_RPATH "${SWIFT_BUILD_RPATH} " )
202
202
set_property (TARGET ${target} APPEND PROPERTY INSTALL_RPATH "${SWIFT_INSTALL_RPATH} " )
203
203
204
204
if (SWIFT_SWIFT_PARSER)
205
- set_property (TARGET ${target}
206
- APPEND PROPERTY BUILD_RPATH "@loader_path/${build_reldir} lib/swift/host" )
207
- set_property (TARGET ${target}
208
- APPEND PROPERTY INSTALL_RPATH "@loader_path/${reldir} lib/swift/host" )
205
+ if (CMAKE_SYSTEM_NAME MATCHES "Darwin" )
206
+ set_property (TARGET ${target}
207
+ APPEND PROPERTY BUILD_RPATH "@loader_path/${build_reldir} lib/swift/host" )
208
+ set_property (TARGET ${target}
209
+ APPEND PROPERTY INSTALL_RPATH "@loader_path/${reldir} lib/swift/host" )
210
+ elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|Android|OpenBSD|FreeBSD" )
211
+ set_property (TARGET ${target}
212
+ APPEND PROPERTY BUILD_RPATH "$ORIGIN/${build_reldir} lib/swift/host" )
213
+ set_property (TARGET ${target}
214
+ APPEND PROPERTY INSTALL_RPATH "$ORIGIN/${reldir} lib/swift/host" )
215
+ endif ()
209
216
endif ()
210
217
endif ()
211
218
endfunction ()
Original file line number Diff line number Diff line change @@ -149,7 +149,11 @@ endif()
149
149
# BEGIN Swift Mods
150
150
# Note that add_properties_for_swift_modules appends RPATHs so it's critical
151
151
# that this is called after lldb_setup_rpaths.
152
- add_properties_for_swift_modules(liblldb "../../../../../../usr/" "../../../../" )
152
+ if (LLDB_BUILD_FRAMEWORK)
153
+ add_properties_for_swift_modules(liblldb "../../../../../../usr/" "../../../../" )
154
+ else ()
155
+ add_properties_for_swift_modules(liblldb "../" )
156
+ endif ()
153
157
# END Swift Mods
154
158
155
159
if (LLDB_ENABLE_PYTHON)
You can’t perform that action at this time.
0 commit comments