2015-10-23 13:53:24 +00:00
|
|
|
PREREQUISITES:
|
2014-12-27 10:47:02 +00:00
|
|
|
|
2017-04-01 18:42:35 +00:00
|
|
|
See cctools/ld64 README + libssl-dev, git, bash, cmake and a jailbroken iOS device
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
2014-12-27 10:47:02 +00:00
|
|
|
|
|
|
|
USAGE:
|
|
|
|
|
2015-10-23 13:53:24 +00:00
|
|
|
Please ensure you have read and understood the Xcode license terms before
|
|
|
|
building this toolchain: https://www.apple.com/legal/sla/docs/xcode.pdf.
|
|
|
|
|
2016-10-21 20:34:47 +00:00
|
|
|
[LLVM_DSYMUTIL=llvm-dsymutil] ./build.sh /path/to/sdk.tar.* <target cpu>
|
2014-12-27 10:47:02 +00:00
|
|
|
|
2015-03-15 21:21:16 +00:00
|
|
|
Target CPU should be one of armv6, armv7, armv7s and arm64.
|
2014-12-27 10:47:02 +00:00
|
|
|
|
|
|
|
This will build an iOS toolchain prefixed with
|
|
|
|
arm-apple-darwin11-*
|
|
|
|
|
|
|
|
You can then use arm-apple-darwin11-clang / arm apple-darwin11-clang++
|
|
|
|
to build your applications.
|
2014-12-28 16:48:45 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
IPHONEOS_DEPLOYMENT_TARGET can be used to target older iOS versions.
|
|
|
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
export IPHONEOS_DEPLOYMENT_TARGET=5.0
|
|
|
|
|
|
|
|
will target iOS 5.0.
|
2017-04-01 18:42:35 +00:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
ISSUES:
|
|
|
|
|
|
|
|
ISSUE: clang: error: invalid version number in '-miphoneos-version-min=10.2'
|
|
|
|
SOLUTION: Targeting iOS >= 10.0 requires Clang >= 4.0.
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
PACKAGING THE SDK:
|
|
|
|
|
|
|
|
Ensure you have read and understood the Xcode license terms before continuing.
|
|
|
|
=> https://www.apple.com/legal/sla/docs/xcode.pdf
|
|
|
|
|
|
|
|
Packaging recents SDKs requires Mac OS Sierra.
|
|
|
|
|
|
|
|
Download Xcode 8.2.1 and extract its content. Then issue the following commands:
|
|
|
|
|
|
|
|
SDK=$(ls -l Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs | grep " -> iPhoneOS.sdk" | head -n1 | awk '{print $9}')
|
|
|
|
cp -r Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk /tmp/$SDK 1>/dev/null
|
|
|
|
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/$SDK/usr/include/c++ 1>/dev/null
|
|
|
|
pushd /tmp
|
|
|
|
tar -cvzf $SDK.tar.gz $SDK
|
|
|
|
rm -rf $SDK
|
|
|
|
mv $SDK.tar.gz ~
|
|
|
|
popd
|
|
|
|
|
|
|
|
The SDK should be now in your home directory.
|