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 @@ -202,10 +202,17 @@ function(add_properties_for_swift_modules target reldir)
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