3 # `xcrun` targets require an Xcode that can determine the correct C compiler via
4 # `xcrun -sdk iphoneos`. This has been standard in Xcode for a while now - any recent
5 # Xcode should do. If the Xcode on the build machine doesn't support this then use
6 # the legacy targets at the end of this file. These require manual definition of
7 # environment variables.
12 inherit_from => [ "darwin-common" ],
14 disable => [ "shared", "async" ],
17 inherit_from => [ "ios-common" ],
18 # It should be possible to go below iOS 6 and even add -arch armv6,
19 # thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
21 CC => "xcrun -sdk iphoneos cc",
22 cflags => add("-arch armv7 -mios-version-min=6.0.0 -fno-common"),
24 perlasm_scheme => "ios32",
27 inherit_from => [ "ios-common" ],
28 CC => "xcrun -sdk iphoneos cc",
29 cflags => add("-arch arm64 -mios-version-min=7.0.0 -fno-common"),
30 bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
31 asm_arch => 'aarch64',
32 perlasm_scheme => "ios64",
34 "iossimulator-xcrun" => {
35 inherit_from => [ "ios-common" ],
36 CC => "xcrun -sdk iphonesimulator cc",
38 "iossimulator-arm64-xcrun" => {
39 inherit_from => [ "ios-common" ],
40 CC => "xcrun -sdk iphonesimulator cc",
41 cflags => add("-arch arm64 -mios-simulator-version-min=7.0.0 -fno-common"),
42 bn_ops => "SIXTY_FOUR_BIT_LONG",
43 asm_arch => 'aarch64',
44 perlasm_scheme => "ios64",
46 "iossimulator-i386-xcrun" => {
47 inherit_from => [ "ios-common" ],
48 CC => "xcrun -sdk iphonesimulator cc",
49 cflags => add("-arch i386 -mios-simulator-version-min=7.0.0 -fno-common"),
52 perlasm_scheme => "macosx",
54 "iossimulator-x86_64-xcrun" => {
55 inherit_from => [ "ios-common" ],
56 CC => "xcrun -sdk iphonesimulator cc",
57 cflags => add("-arch x86_64 -mios-simulator-version-min=7.0.0 -fno-common"),
58 bn_ops => "SIXTY_FOUR_BIT_LONG",
60 perlasm_scheme => "macosx",
62 # It takes three prior-set environment variables to make it work:
64 # CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
65 # CROSS_TOP=/where/SDKs/are
66 # CROSS_SDK=iPhoneOSx.y.sdk
68 # Exact paths vary with Xcode releases, but for couple of last ones
69 # they would look like this:
71 # CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
72 # CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
73 # CROSS_SDK=iPhoneOS.sdk
76 inherit_from => [ "ios-common" ],
77 cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
80 inherit_from => [ "ios-xcrun" ],
82 cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK)"),
85 inherit_from => [ "ios64-xcrun" ],
87 cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK)"),