Add an option to recursive-lipo to explicitly specify files to be merged, even if contained in verbatim-copy directories, and use it for libSwiftScan.

This library is contained in `lib/swift/<OS>/`, which `recursive-lipo` assumes contains the stdlib, and other Swift code built fat from the get-go. `libSwiftScan` is a part of the compiler build, and is therefore built for the host in a given build, which means toolchain installation requries that we use `lipo` to produce a fat shared library for it.

Resolves rdar://74490218
This commit is contained in:
Artem Chikin
2021-04-19 09:59:10 -07:00
parent 4e0c6f99b8
commit 792e3ddba7
2 changed files with 21 additions and 4 deletions

View File

@@ -3293,7 +3293,7 @@ if [[ ${#LIPO_SRC_DIRS[@]} -gt 0 ]]; then
else
LIPO_PATH="${HOST_LIPO}"
fi
call "${SWIFT_SOURCE_DIR}"/utils/recursive-lipo --lipo=${LIPO_PATH} --copy-subdirs="$(get_host_install_prefix ${host})lib/swift $(get_host_install_prefix ${host})lib/swift_static" --destination="$(get_host_install_destdir ${mergedHost})" ${LIPO_SRC_DIRS[@]}
call "${SWIFT_SOURCE_DIR}"/utils/recursive-lipo --lipo=${LIPO_PATH} --copy-subdirs="$(get_host_install_prefix ${host})lib/swift $(get_host_install_prefix ${host})lib/swift_static" --explicit-src-files="$(get_host_install_prefix ${host})lib/swift/${host%%-*}/lib_InternalSwiftScan.dylib" --destination="$(get_host_install_destdir ${mergedHost})" ${LIPO_SRC_DIRS[@]}
if [[ $(should_execute_action "${mergedHost}-lipo") ]]; then
# Build and test the lipo-ed package.