Skip to content

Commit 93450eb

Browse files
authored
Update boost.sh
added support for building 32 + 64 bit macOS universal.
1 parent 289f9e6 commit 93450eb

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

boost.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,30 @@ buildUniversal()
905905
fi
906906
done
907907
fi
908+
# Note caller needs to manually pass in --macos-archs "i386 x86_64" (in addition to --universal)
909+
# to build 32 bit and 64 bit fat.
910+
if [[ -n $BUILD_MACOS ]]; then
911+
mkdir -p "$MACOS_BUILD_DIR/universal"
912+
913+
cd "$MACOS_BUILD_DIR"
914+
for NAME in $BOOTSTRAP_LIBS; do
915+
if [ "$NAME" == "test" ]; then
916+
NAME="unit_test_framework"
917+
fi
918+
919+
ARCH_FILES=""
920+
if [ -f "i386/libboost_$NAME.a" ]; then
921+
ARCH_FILES+=" i386/libboost_$NAME.a"
922+
fi
923+
if [ -f "x86_64/libboost_$NAME.a" ]; then
924+
ARCH_FILES+=" x86_64/libboost_$NAME.a"
925+
fi
926+
if [[ ${ARCH_FILES[@]} ]]; then
927+
echo "... $NAME"
928+
$TVOS_ARM_DEV_CMD lipo -create $ARCH_FILES -o "universal/libboost_$NAME.a" || abort "Lipo $1 failed"
929+
fi
930+
done
931+
fi
908932
}
909933

910934
#===============================================================================

0 commit comments

Comments
 (0)