Skip to content

Commit 05028a2

Browse files
committed
[Apple Silicon] [build-script] Fix lipo step invocation with --no-legacy-impl.
LIPO_SRC_DIRS wasn't set for '--only-execute merged-hosts-lipo', because the logic was skipped for actions other than install.
1 parent 39ee89f commit 05028a2

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

utils/build-script-impl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3023,21 +3023,21 @@ done
30233023

30243024
# Lipo those products which require it, optionally build and test an installable package.
30253025
mergedHost="merged-hosts"
3026-
if [[ ${#LIPO_SRC_DIRS[@]} -gt 0 ]] && [[ $(should_execute_action "${mergedHost}-lipo") ]]; then
3026+
if [[ ${#LIPO_SRC_DIRS[@]} -gt 0 ]]; then
30273027
# This is from multiple hosts; Which host should we say it is?
30283028
# Let's call it 'merged-hosts' so that we can identify it.
30293029

3030-
echo "--- Merging and running lipo ---"
3030+
if [[ $(should_execute_action "${mergedHost}-lipo") ]]; then
3031+
# Allow passing lipo with --host-lipo
3032+
if [[ -z "${HOST_LIPO}" ]] ; then
3033+
LIPO_PATH=$(xcrun_find_tool lipo)
3034+
else
3035+
LIPO_PATH="${HOST_LIPO}"
3036+
fi
3037+
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[@]}
30313038

3032-
# Allow passing lipo with --host-lipo
3033-
if [[ -z "${HOST_LIPO}" ]] ; then
3034-
LIPO_PATH=$(xcrun_find_tool lipo)
3035-
else
3036-
LIPO_PATH="${HOST_LIPO}"
3039+
# Build and test the lipo-ed package.
3040+
build_and_test_installable_package ${mergedHost}
30373041
fi
3038-
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[@]}
3039-
3040-
# Build and test the lipo-ed package.
3041-
build_and_test_installable_package ${mergedHost}
30423042
fi
30433043
# END

0 commit comments

Comments
 (0)