Skip to content

Commit 312d392

Browse files
committed
Include host compatibility library build directory
The SDK doesn't have the new compatibility library and the crosscompile-with-hostlibs bootstrap configuration is failing. This bootstrap configuration is the only one that does not fall back on the host built compatibility libraries if it is not available in the SDK.
1 parent f7810ad commit 312d392

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,10 @@ function(_add_swift_runtime_link_flags target relpath_to_lib_dir bootstrapping)
471471
# Add the SDK directory for the host platform.
472472
target_link_directories(${target} PRIVATE "${sdk_dir}")
473473
474+
# A backup in case the toolchain doesn't have one of the compatibility libraries.
475+
target_link_directories(${target} PRIVATE
476+
"${SWIFTLIB_DIR}/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}")
477+
474478
# Include the abi stable system stdlib in our rpath.
475479
set(swift_runtime_rpath "/usr/lib/swift")
476480

0 commit comments

Comments
 (0)