radare2/sys/ios-sdk-ld
pancake afe3792d0f Force embed-bitcode on iOS builds
- Fix typo and improve ios-sdk build
- Don't let capstone set the -arch flags
2018-06-10 03:38:28 +02:00

21 lines
422 B
Bash
Executable File

#!/bin/sh
[ -z "${CPU}" ] && CPU="arm64"
CWD="$(dirname "$0")"
[ -z "${IOSINC}" ] && IOSINC="${CWD}/ios-include"
CPUS=""
CPU=`echo $CPU | sed -e 's,+, ,g'`
for a in `IFS=+ echo ${CPU}` ; do
CPUS="-arch $a ${CPUS}"
done
[ -z "${SDK}" ] && SDK=iphoneos
APPLE_SDK=`echo ${SDK} | tr a-z A-Z`
LD="xcrun --sdk ${SDK} ld ${CPUS} -bitcode_bundle"
echo "$LD $*"
${LD} $*
r=$?
if [ "$r" != 0 ]; then
echo ${LD} $* >&2
fi
exit $r