File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -229,10 +229,17 @@ function(add_properties_for_swift_modules target reldir)
229
229
set_property (TARGET ${target} APPEND PROPERTY INSTALL_RPATH "${SWIFT_INSTALL_RPATH} " )
230
230
231
231
if (SWIFT_SWIFT_PARSER )
232
- set_property (TARGET ${target}
233
- APPEND PROPERTY BUILD_RPATH "@loader_path/${build_reldir} lib/swift/host" )
234
- set_property (TARGET ${target}
235
- APPEND PROPERTY INSTALL_RPATH "@loader_path/${reldir} lib/swift/host" )
232
+ if (CMAKE_SYSTEM_NAME MATCHES "Darwin" )
233
+ set_property (TARGET ${target}
234
+ APPEND PROPERTY BUILD_RPATH "@loader_path/${build_reldir} lib/swift/host" )
235
+ set_property (TARGET ${target}
236
+ APPEND PROPERTY INSTALL_RPATH "@loader_path/${reldir} lib/swift/host" )
237
+ elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|Android|OpenBSD|FreeBSD" )
238
+ set_property (TARGET ${target}
239
+ APPEND PROPERTY BUILD_RPATH "$ORIGIN/${build_reldir} lib/swift/host" )
240
+ set_property (TARGET ${target}
241
+ APPEND PROPERTY INSTALL_RPATH "$ORIGIN/${reldir} lib/swift/host" )
242
+ endif ()
236
243
endif ()
237
244
endif ()
238
245
endfunction ()
Original file line number Diff line number Diff line change @@ -154,7 +154,11 @@ endif()
154
154
# BEGIN Swift Mods
155
155
# Note that add_properties_for_swift_modules appends RPATHs so it's critical
156
156
# that this is called after lldb_setup_rpaths.
157
- add_properties_for_swift_modules (liblldb "../../../../../../usr/" "../../../../" )
157
+ if (LLDB_BUILD_FRAMEWORK )
158
+ add_properties_for_swift_modules (liblldb "../../../../../../usr/" "../../../../" )
159
+ else ()
160
+ add_properties_for_swift_modules (liblldb "../" )
161
+ endif ()
158
162
# END Swift Mods
159
163
160
164
if (LLDB_ENABLE_PYTHON )
You can’t perform that action at this time.
0 commit comments