macOS: support newer SDKs

Update to match Xcode command-line-tools SDKs from 10.X to 16.X

Signed-off-by: Doug Junkins <douglas.junkins@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Doug Junkins 2022-11-21 12:55:47 -08:00 committed by Dirk Hohndel
parent 520be78fa8
commit d537e16cb1

View file

@ -178,13 +178,10 @@ if [ "$PLATFORM" = Darwin ] ; then
exit 1; exit 1;
fi fi
# find a 10.x base SDK to use, or if none can be found, find a numbered 11.x base SDK to use # find a 10.x base SDK to use, or if none can be found, find a numbered 11.x base SDK to use
BASESDK=$(ls $SDKROOT | grep "MacOSX10\.1.\.sdk" | head -1 | sed -e "s/MacOSX//;s/\.sdk//") BASESDK=$(ls $SDKROOT | grep -E "MacOSX1[0-6]\.[0-9]+\.sdk" | head -1 | sed -e "s/MacOSX//;s/\.sdk//")
if [ -z "$BASESDK" ] ; then if [ -z "$BASESDK" ] ; then
BASESDK=$(ls $SDKROOT | grep -E "MacOSX11\.[0-9]+\.sdk" | head -1 | sed -e "s/MacOSX//;s/\.sdk//") echo "Cannot find a base SDK of type 1[0-6].x under the SDK root of ${SDKROOT}"
if [ -z "$BASESDK" ] ; then exit 1;
echo "Cannot find a base SDK of type 10.x or 11.x under the SDK root of ${SDKROOT}"
exit 1;
fi
fi fi
if [ "$ARCHS" != "" ] ; then if [ "$ARCHS" != "" ] ; then
# we do assume that the two architectures mentioned are x86_64 and arm64 .. that's kinda wrong # we do assume that the two architectures mentioned are x86_64 and arm64 .. that's kinda wrong