Skip to content

Commit 73dc49f

Browse files
committed
[Build System] Remove tvOS i368 slice before copying the libs
1 parent cc542c0 commit 73dc49f

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
@@ -1385,7 +1385,11 @@ function copy_embedded_compiler_rt_builtins_from_darwin_host_toolchain() {
13851385
DEST_LIB_PATH="${DEST_BUILTINS_DIR}/${LIB_NAME}"
13861386
if [[ ! -f "${DEST_LIB_PATH}" ]]; then
13871387
if [[ -f "${HOST_LIB_PATH}" ]]; then
1388-
call cp "${HOST_LIB_PATH}" "${DEST_LIB_PATH}"
1388+
if [[ "$OS" == "tvos" ]]; then
1389+
call lipo -remove i386 "${HOST_LIB_PATH}" -output "${DEST_LIB_PATH}"
1390+
else
1391+
call cp "${HOST_LIB_PATH}" "${DEST_LIB_PATH}"
1392+
fi
13891393
elif [[ "${VERBOSE_BUILD}" ]]; then
13901394
echo "no file exists at ${HOST_LIB_PATH}"
13911395
fi
@@ -1397,7 +1401,11 @@ function copy_embedded_compiler_rt_builtins_from_darwin_host_toolchain() {
13971401
DEST_SIM_LIB_PATH="${DEST_BUILTINS_DIR}/${SIM_LIB_NAME}"
13981402
if [[ ! -f "${DEST_SIM_LIB_PATH}" ]]; then
13991403
if [[ -f "${HOST_SIM_LIB_PATH}" ]]; then
1400-
call cp "${HOST_SIM_LIB_PATH}" "${DEST_SIM_LIB_PATH}"
1404+
if [[ "$OS" == "tvos" ]]; then
1405+
call lipo -remove i386 "${HOST_SIM_LIB_PATH}" -output "${DEST_SIM_LIB_PATH}"
1406+
else
1407+
call cp "${HOST_SIM_LIB_PATH}" "${DEST_SIM_LIB_PATH}"
1408+
fi
14011409
elif [[ -f "${HOST_LIB_PATH}" ]]; then
14021410
# The simulator .a might not exist if the host
14031411
# Xcode is old. In that case, copy over the

0 commit comments

Comments
 (0)