2018-06-03 18:47:54 +00:00
|
|
|
#### iPhoneOS/iOS
|
|
|
|
#
|
|
|
|
# It takes recent enough XCode to use following two targets. It shouldn't
|
|
|
|
# be a problem by now, but if they don't work, original targets below
|
|
|
|
# that depend on manual definition of environment variables should still
|
|
|
|
# work...
|
|
|
|
#
|
|
|
|
my %targets = (
|
2018-10-15 16:37:18 +00:00
|
|
|
"ios-common" => {
|
|
|
|
template => 1,
|
|
|
|
inherit_from => [ "darwin-common" ],
|
|
|
|
sys_id => "iOS",
|
|
|
|
disable => [ "engine", "async" ],
|
|
|
|
},
|
2018-06-03 18:47:54 +00:00
|
|
|
"ios-xcrun" => {
|
2018-10-15 16:37:18 +00:00
|
|
|
inherit_from => [ "ios-common", asm("armv4_asm") ],
|
2018-06-03 18:47:54 +00:00
|
|
|
# It should be possible to go below iOS 6 and even add -arch armv6,
|
|
|
|
# thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
|
|
|
|
# at this point.
|
|
|
|
CC => "xcrun -sdk iphoneos cc",
|
|
|
|
cflags => add("-arch armv7 -mios-version-min=6.0.0 -fno-common"),
|
|
|
|
perlasm_scheme => "ios32",
|
|
|
|
},
|
|
|
|
"ios64-xcrun" => {
|
2018-10-15 16:37:18 +00:00
|
|
|
inherit_from => [ "ios-common", asm("aarch64_asm") ],
|
2018-06-03 18:47:54 +00:00
|
|
|
CC => "xcrun -sdk iphoneos cc",
|
|
|
|
cflags => add("-arch arm64 -mios-version-min=7.0.0 -fno-common"),
|
|
|
|
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
|
|
|
|
perlasm_scheme => "ios64",
|
|
|
|
},
|
|
|
|
"iossimulator-xcrun" => {
|
2018-10-15 16:37:18 +00:00
|
|
|
inherit_from => [ "ios-common" ],
|
2018-06-03 18:47:54 +00:00
|
|
|
CC => "xcrun -sdk iphonesimulator cc",
|
|
|
|
},
|
|
|
|
# It takes three prior-set environment variables to make it work:
|
|
|
|
#
|
|
|
|
# CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
|
|
|
|
# CROSS_TOP=/where/SDKs/are
|
|
|
|
# CROSS_SDK=iPhoneOSx.y.sdk
|
|
|
|
#
|
|
|
|
# Exact paths vary with Xcode releases, but for couple of last ones
|
|
|
|
# they would look like this:
|
|
|
|
#
|
|
|
|
# CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
|
|
|
|
# CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
|
|
|
|
# CROSS_SDK=iPhoneOS.sdk
|
|
|
|
#
|
|
|
|
"iphoneos-cross" => {
|
2018-10-15 16:37:18 +00:00
|
|
|
inherit_from => [ "ios-common" ],
|
2018-06-03 18:47:54 +00:00
|
|
|
cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
|
|
|
|
},
|
|
|
|
"ios-cross" => {
|
|
|
|
inherit_from => [ "ios-xcrun" ],
|
|
|
|
CC => "cc",
|
|
|
|
cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK)"),
|
|
|
|
},
|
|
|
|
"ios64-cross" => {
|
|
|
|
inherit_from => [ "ios64-xcrun" ],
|
|
|
|
CC => "cc",
|
|
|
|
cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK)"),
|
|
|
|
},
|
|
|
|
);
|