Skip to content

Commit ca24fd5

Browse files
committed
Specify '-resource-dir' when compiling Swift libraries, so we can find
libraries for the destination host when cross-compiling.
1 parent 673a8ec commit ca24fd5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ function(_add_variant_swift_compile_flags
180180

181181
list(APPEND result
182182
"-sdk" "${SWIFT_SDK_${sdk}_PATH}"
183-
"-target" "${SWIFT_SDK_${sdk}_ARCH_${arch}_TRIPLE}")
183+
"-target" "${SWIFT_SDK_${sdk}_ARCH_${arch}_TRIPLE}"
184+
"-resource-dir" "${SWIFTLIB_DIR}")
184185

185186
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
186187
list(APPEND result

0 commit comments

Comments
 (0)