Skip to content

Commit 611e59e

Browse files
committed
[Build System] Remove tvOS i368 slice before copying the libs
(cherry picked from commit 73dc49f)
1 parent cc2c424 commit 611e59e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

utils/build-script-impl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,11 @@ function copy_embedded_compiler_rt_builtins_from_darwin_host_toolchain() {
14041404
DEST_LIB_PATH="${DEST_BUILTINS_DIR}/${LIB_NAME}"
14051405
if [[ ! -f "${DEST_LIB_PATH}" ]]; then
14061406
if [[ -f "${HOST_LIB_PATH}" ]]; then
1407-
call cp "${HOST_LIB_PATH}" "${DEST_LIB_PATH}"
1407+
if [[ "$OS" == "tvos" ]]; then
1408+
call lipo -remove i386 "${HOST_LIB_PATH}" -output "${DEST_LIB_PATH}"
1409+
else
1410+
call cp "${HOST_LIB_PATH}" "${DEST_LIB_PATH}"
1411+
fi
14081412
elif [[ "${VERBOSE_BUILD}" ]]; then
14091413
echo "no file exists at ${HOST_LIB_PATH}"
14101414
fi
@@ -1416,7 +1420,11 @@ function copy_embedded_compiler_rt_builtins_from_darwin_host_toolchain() {
14161420
DEST_SIM_LIB_PATH="${DEST_BUILTINS_DIR}/${SIM_LIB_NAME}"
14171421
if [[ ! -f "${DEST_SIM_LIB_PATH}" ]]; then
14181422
if [[ -f "${HOST_SIM_LIB_PATH}" ]]; then
1419-
call cp "${HOST_SIM_LIB_PATH}" "${DEST_SIM_LIB_PATH}"
1423+
if [[ "$OS" == "tvos" ]]; then
1424+
call lipo -remove i386 "${HOST_SIM_LIB_PATH}" -output "${DEST_SIM_LIB_PATH}"
1425+
else
1426+
call cp "${HOST_SIM_LIB_PATH}" "${DEST_SIM_LIB_PATH}"
1427+
fi
14201428
elif [[ -f "${HOST_LIB_PATH}" ]]; then
14211429
# The simulator .a might not exist if the host
14221430
# Xcode is old. In that case, copy over the

0 commit comments

Comments
 (0)