radare2/sys/ios-sdk-gcc

19 lines
479 B
Plaintext
Raw Permalink Normal View History

2014-05-17 02:27:49 +00:00
#!/bin/sh
2017-07-04 00:10:43 +00:00
[ -z "${CPU}" ] && CPU="arm64"
2015-06-17 03:47:36 +00:00
CWD="$(dirname "$0")"
2015-10-09 09:42:49 +00:00
[ -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`
CC="xcrun --sdk ${SDK} clang ${CPUS} -fembed-bitcode -DAPPLE_SDK_${APPLE_SDK}=1 -I${IOSINC} -miphoneos-version-min=10.0"
echo $CC $*
${CC} $*
r=$?
[ "$r" != 0 ] && echo ${CC} $* >&2
exit $r