cctools-port/usage_examples/ios_toolchain/README

60 lines
1.8 KiB
Plaintext
Raw Normal View History

2015-10-23 13:53:24 +00:00
PREREQUISITES:
2017-04-01 18:42:35 +00:00
See cctools/ld64 README + libssl-dev, git, bash, cmake and a jailbroken iOS device
--------------------------------------------------------------------------------
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.
[LLVM_DSYMUTIL=llvm-dsymutil] ./build.sh /path/to/sdk.tar.* <target cpu>
Target CPU should be one of armv6, armv7, armv7s and arm64.
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.
---
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.