Skip to content

Commit

Permalink
[Build System] Remove tvOS i368 slice before copying the libs
Browse files Browse the repository at this point in the history
  • Loading branch information
shahmishal committed Oct 20, 2020
1 parent cc542c0 commit 73dc49f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,11 @@ function copy_embedded_compiler_rt_builtins_from_darwin_host_toolchain() {
DEST_LIB_PATH="${DEST_BUILTINS_DIR}/${LIB_NAME}"
if [[ ! -f "${DEST_LIB_PATH}" ]]; then
if [[ -f "${HOST_LIB_PATH}" ]]; then
call cp "${HOST_LIB_PATH}" "${DEST_LIB_PATH}"
if [[ "$OS" == "tvos" ]]; then
call lipo -remove i386 "${HOST_LIB_PATH}" -output "${DEST_LIB_PATH}"
else
call cp "${HOST_LIB_PATH}" "${DEST_LIB_PATH}"
fi
elif [[ "${VERBOSE_BUILD}" ]]; then
echo "no file exists at ${HOST_LIB_PATH}"
fi
Expand All @@ -1397,7 +1401,11 @@ function copy_embedded_compiler_rt_builtins_from_darwin_host_toolchain() {
DEST_SIM_LIB_PATH="${DEST_BUILTINS_DIR}/${SIM_LIB_NAME}"
if [[ ! -f "${DEST_SIM_LIB_PATH}" ]]; then
if [[ -f "${HOST_SIM_LIB_PATH}" ]]; then
call cp "${HOST_SIM_LIB_PATH}" "${DEST_SIM_LIB_PATH}"
if [[ "$OS" == "tvos" ]]; then
call lipo -remove i386 "${HOST_SIM_LIB_PATH}" -output "${DEST_SIM_LIB_PATH}"
else
call cp "${HOST_SIM_LIB_PATH}" "${DEST_SIM_LIB_PATH}"
fi
elif [[ -f "${HOST_LIB_PATH}" ]]; then
# The simulator .a might not exist if the host
# Xcode is old. In that case, copy over the
Expand Down

0 comments on commit 73dc49f

Please sign in to comment.