Clean up platforms

- Rename WatchOS platform to Watch
- Drop Apple Watch armv7k
- Use "MacOSX" sys_id in targets .conf
This commit is contained in:
Davide De Rosa 2020-11-13 22:49:03 +01:00
parent 8ad22a2b3e
commit 2f5cdaf136
4 changed files with 21 additions and 26 deletions

View File

@ -549,8 +549,8 @@ fi
# Build tvOS library if selected for build
if [ ${#LIBSSL_WATCHOS[@]} -gt 0 ]; then
echo "Build library for watchOS..."
lipo -create ${LIBSSL_WATCHOS[@]} -output "${CURRENTPATH}/lib/libssl-WatchOS.a"
lipo -create ${LIBCRYPTO_WATCHOS[@]} -output "${CURRENTPATH}/lib/libcrypto-WatchOS.a"
lipo -create ${LIBSSL_WATCHOS[@]} -output "${CURRENTPATH}/lib/libssl-Watch.a"
lipo -create ${LIBCRYPTO_WATCHOS[@]} -output "${CURRENTPATH}/lib/libcrypto-Watch.a"
fi
# Build tvOS library if selected for build

View File

@ -68,9 +68,9 @@ my %targets = ();
},
# Simulator (arm64)
"ios-sim-cross-arm64" => {
inherit_from => [ "darwin64-arm64-cc", "ios-cross-base" ],
cflags => add("-target arm64-apple-ios13.0-simulator"),
sys_id => "iOS",
inherit_from => [ "darwin64-arm64-cc", "ios-cross-base" ],
cflags => add("-target arm64-apple-ios13.0-simulator"),
sys_id => "iOS",
},
## Apple macOS
@ -88,12 +88,12 @@ my %targets = ();
# Device (x86_64)
"macos64-x86_64" => {
inherit_from => [ "darwin64-x86_64-cc", "macos-base" ],
sys_id => "macOS",
sys_id => "MacOSX",
},
# Device (arm64)
"macos64-arm64" => {
inherit_from => [ "darwin64-arm64-cc", "macos-base" ],
sys_id => "macOS",
inherit_from => [ "darwin64-arm64-cc", "macos-base" ],
sys_id => "MacOSX",
},
# Catalyst (x86_64)
"mac-catalyst-x86_64" => {
@ -103,9 +103,9 @@ my %targets = ();
},
# Catalyst (arm64)
"mac-catalyst-arm64" => {
inherit_from => [ "darwin64-arm64-cc", "mac-catalyst-base" ],
cflags => add("-target arm64-apple-ios13.0-macabi "),
sys_id => "MacOSX",
inherit_from => [ "darwin64-arm64-cc", "mac-catalyst-base" ],
cflags => add("-target arm64-apple-ios13.0-macabi "),
sys_id => "MacOSX",
},
## Apple WatchOS

View File

@ -21,22 +21,22 @@ if [ -d $FWROOT ]; then
rm -rf $FWROOT
fi
ALL_SYSTEMS=("iPhone" "AppleTV" "MacOSX" "Catalyst" "WatchOS")
ALL_SYSTEMS=("iPhone" "AppleTV" "MacOSX" "Catalyst" "Watch")
function check_bitcode() {
local FWDIR=$1
if [[ $FWTYPE == "dynamic" ]]; then
BITCODE_PATTERN="__LLVM"
BITCODE_PATTERN="__LLVM"
else
BITCODE_PATTERN="__bitcode"
fi
BITCODE_PATTERN="__bitcode"
fi
if otool -l "$FWDIR/$FWNAME" | grep "${BITCODE_PATTERN}" >/dev/null; then
echo "INFO: $FWDIR contains Bitcode"
else
echo "INFO: $FWDIR doesn't contain Bitcode"
fi
if otool -l "$FWDIR/$FWNAME" | grep "${BITCODE_PATTERN}" >/dev/null; then
echo "INFO: $FWDIR contains Bitcode"
else
echo "INFO: $FWDIR doesn't contain Bitcode"
fi
}
# Inspect Mach-O load commands to get minimum SDK version.
@ -187,12 +187,7 @@ if [ $FWTYPE == "dynamic" ]; then
for SYS in ${ALL_SYSTEMS[@]}; do
SYSDIR="$FWROOT/$SYS"
FWDIR="$SYSDIR/$FWNAME.framework"
if [[ $SYS == "WatchOS" ]]; then
DYLIBS=(bin/Watch*/$FWNAME.dylib)
else
DYLIBS=(bin/${SYS}*/$FWNAME.dylib)
fi
DYLIBS=(bin/${SYS}*/$FWNAME.dylib)
if [[ ${#DYLIBS[@]} -gt 0 && -e ${DYLIBS[0]} ]]; then
echo "Creating framework for $SYS"