mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-21 06:03:12 +00:00
Omit 32-bit architectures when building for iOS 11 and later
This commit is contained in:
parent
20c15e8b94
commit
7993332fe9
48
ios/configure
vendored
48
ios/configure
vendored
@ -30,7 +30,8 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: ${0##*/} [-f|--force]"
|
echo "Usage: ${0##*/} [-f|--force] [iphone-version]"
|
||||||
|
echo "Eg: ${0##*/} 10.3"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run the Serval DNA configure script once for each architecture, and save the
|
# Run the Serval DNA configure script once for each architecture, and save the
|
||||||
@ -39,13 +40,26 @@ usage() {
|
|||||||
main() {
|
main() {
|
||||||
setup
|
setup
|
||||||
parse_command_line "$@"
|
parse_command_line "$@"
|
||||||
|
if [ -z "$ios_version" ]; then
|
||||||
|
discover_sdk_versions
|
||||||
|
fi
|
||||||
check
|
check
|
||||||
exec 5>&1
|
exec 5>&1
|
||||||
TARGETS=()
|
TARGETS=()
|
||||||
configure iphoneos armv7 /Library/Serval
|
if [ -n "$ios_version" ]; then
|
||||||
configure iphoneos arm64 /Library/Serval
|
configure "iphoneos$ios_version" arm64 /Library/Serval
|
||||||
configure iphonesimulator i386 /tmp/serval-dna
|
# 32-bit architectures are not supported in iOS 11 and later.
|
||||||
configure iphonesimulator x86_64 /tmp/serval-dna
|
if [ ${ios_version%%.*} -lt 11 ]; then
|
||||||
|
configure "iphoneos$ios_version" armv7 /Library/Serval
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -n "$sim_version" ]; then
|
||||||
|
configure "iphonesimulator$sim_version" x86_64 /tmp/serval-dna
|
||||||
|
# 32-bit architectures are not supported in iOS 11 and later.
|
||||||
|
if [ ${sim_version%%.*} -lt 11 ]; then
|
||||||
|
configure "iphonesimulator$sim_version" i386 /tmp/serval-dna
|
||||||
|
fi
|
||||||
|
fi
|
||||||
create_makefile
|
create_makefile
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,12 +91,12 @@ fatal() {
|
|||||||
parse_command_line() {
|
parse_command_line() {
|
||||||
library=libservaldaemon.a
|
library=libservaldaemon.a
|
||||||
swiftmodule=ServalDNA.swiftmodule
|
swiftmodule=ServalDNA.swiftmodule
|
||||||
|
ios_version=
|
||||||
opt_force_configure=false
|
opt_force_configure=false
|
||||||
opt_force_config_status=false
|
opt_force_config_status=false
|
||||||
log_display_line_count=10
|
log_display_line_count=10
|
||||||
while [ $# -ne 0 ]; do
|
while [ $# -ne 0 ]; do
|
||||||
opt="$1"
|
opt="$1"
|
||||||
shift
|
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
-h | --help)
|
-h | --help)
|
||||||
usage
|
usage
|
||||||
@ -98,9 +112,29 @@ parse_command_line() {
|
|||||||
usage_error "Unknown option: $opt"
|
usage_error "Unknown option: $opt"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage_error "Spurious argument: $opt"
|
break
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
if [ $# -eq 1 ]; then
|
||||||
|
ios_version="$1"
|
||||||
|
shift
|
||||||
|
elif [ $# -gt 1 ]; then
|
||||||
|
usage_error "Spurious argument: $2"
|
||||||
|
fi
|
||||||
|
sim_version="$ios_version"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Discover available SDK versions for iPhoneOS and iPhoneSimulator.
|
||||||
|
|
||||||
|
discover_sdk_versions() {
|
||||||
|
local sdk
|
||||||
|
for sdk in $(xcodebuild -showsdks | sed -n -e 's/^.*-sdk \([^ ][^ ]*\)$/\1/p'); do
|
||||||
|
case "$sdk" in
|
||||||
|
iphoneos*) ios_version=${sdk#iphoneos};;
|
||||||
|
iphonesimulator*) sim_version=${sdk#iphonesimulator};;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user