File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1457,7 +1457,11 @@ function copy_embedded_compiler_rt_builtins_from_darwin_host_toolchain() {
1457
1457
DEST_LIB_PATH=" ${DEST_BUILTINS_DIR} /${LIB_NAME} "
1458
1458
if [[ ! -f " ${DEST_LIB_PATH} " ]]; then
1459
1459
if [[ -f " ${HOST_LIB_PATH} " ]]; then
1460
- call cp " ${HOST_LIB_PATH} " " ${DEST_LIB_PATH} "
1460
+ if [[ " $OS " == " tvos" ]]; then
1461
+ call lipo -remove i386 " ${HOST_LIB_PATH} " -output " ${DEST_LIB_PATH} " || call cp " ${HOST_LIB_PATH} " " ${DEST_LIB_PATH} "
1462
+ else
1463
+ call cp " ${HOST_LIB_PATH} " " ${DEST_LIB_PATH} "
1464
+ fi
1461
1465
elif [[ " ${VERBOSE_BUILD} " ]]; then
1462
1466
echo " no file exists at ${HOST_LIB_PATH} "
1463
1467
fi
@@ -1469,7 +1473,11 @@ function copy_embedded_compiler_rt_builtins_from_darwin_host_toolchain() {
1469
1473
DEST_SIM_LIB_PATH=" ${DEST_BUILTINS_DIR} /${SIM_LIB_NAME} "
1470
1474
if [[ ! -f " ${DEST_SIM_LIB_PATH} " ]]; then
1471
1475
if [[ -f " ${HOST_SIM_LIB_PATH} " ]]; then
1472
- call cp " ${HOST_SIM_LIB_PATH} " " ${DEST_SIM_LIB_PATH} "
1476
+ if [[ " $OS " == " tvos" ]]; then
1477
+ call lipo -remove i386 " ${HOST_SIM_LIB_PATH} " -output " ${DEST_SIM_LIB_PATH} " || call cp " ${HOST_SIM_LIB_PATH} " " ${DEST_SIM_LIB_PATH} "
1478
+ else
1479
+ call cp " ${HOST_SIM_LIB_PATH} " " ${DEST_SIM_LIB_PATH} "
1480
+ fi
1473
1481
elif [[ -f " ${HOST_LIB_PATH} " ]]; then
1474
1482
# The simulator .a might not exist if the host
1475
1483
# Xcode is old. In that case, copy over the
You can’t perform that action at this time.
0 commit comments