File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
tools/SourceKit/cmake/modules Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -579,7 +579,12 @@ function(_add_swift_runtime_link_flags target relpath_to_lib_dir bootstrapping)
579
579
target_link_directories(${target} PRIVATE " ${sdk_dir} ")
580
580
581
581
# Include the abi stable system stdlib in our rpath.
582
- set(swift_runtime_rpath " /usr/lib/swift ")
582
+ set(swift_runtime_rpath " /usr/lib/swift ")
583
+
584
+ # Add in the toolchain directory so we can grab compatibility libraries
585
+ get_filename_component(TOOLCHAIN_BIN_DIR ${SWIFT_EXEC_FOR_SWIFT_MODULES} DIRECTORY)
586
+ get_filename_component(TOOLCHAIN_LIB_DIR " ${TOOLCHAIN_BIN_DIR} /../lib/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR} " ABSOLUTE)
587
+ target_link_directories(${target} PUBLIC ${TOOLCHAIN_LIB_DIR} )
583
588
endif()
584
589
endif()
585
590
endif()
Original file line number Diff line number Diff line change @@ -167,7 +167,12 @@ function(add_sourcekit_swift_runtime_link_flags target path HAS_SWIFT_MODULES)
167
167
target_link_directories (${target} PRIVATE "${sdk_dir} " )
168
168
169
169
# Include the abi stable system stdlib in our rpath.
170
- set (swift_runtime_rpath "/usr/lib/swift" )
170
+ set (swift_runtime_rpath "/usr/lib/swift" )
171
+
172
+ # Add in the toolchain directory so we can grab compatibility libraries
173
+ get_filename_component (TOOLCHAIN_BIN_DIR ${SWIFT_EXEC_FOR_SWIFT_MODULES} DIRECTORY )
174
+ get_filename_component (TOOLCHAIN_LIB_DIR "${TOOLCHAIN_BIN_DIR} /../lib/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK} _LIB_SUBDIR}" ABSOLUTE )
175
+ target_link_directories (${target} PUBLIC ${TOOLCHAIN_LIB_DIR} )
171
176
endif ()
172
177
endif ()
173
178
endif ()
You can’t perform that action at this time.
0 commit comments