mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-26 07:17:01 +00:00
9f08ccbcc4
* Fix system() not available for iOS Simulator * Embedding Bitcode should be set in sys/ios-sdk.sh. Removed unused code * Supports now all available iOS archs and the simulator
21 lines
462 B
Bash
Executable File
21 lines
462 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'`
|
|
EXTRA=""
|
|
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} -DAPPLE_SDK_${APPLE_SDK}=1 -I${IOSINC} ${EXTRA}"
|
|
echo $CC $*
|
|
${CC} $*
|
|
r=$?
|
|
if [ "$r" != 0 ]; then
|
|
echo ${CC} $* >&2
|
|
fi
|
|
exit $r |