2014-05-17 10:27:49 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-07-04 08:10:43 +08:00
|
|
|
[ -z "${CPU}" ] && CPU="arm64"
|
2015-06-17 11:47:36 +08:00
|
|
|
CWD="$(dirname "$0")"
|
2015-10-09 17:42:49 +08:00
|
|
|
[ -z "${IOSINC}" ] && IOSINC="${CWD}/ios-include"
|
2015-12-28 09:00:54 +08:00
|
|
|
CPUS=""
|
|
|
|
CPU=`echo $CPU | sed -e 's,+, ,g'`
|
|
|
|
for a in `IFS=+ echo ${CPU}` ; do
|
|
|
|
CPUS="-arch $a ${CPUS}"
|
|
|
|
done
|
2015-12-29 03:40:18 +08:00
|
|
|
[ -z "${SDK}" ] && SDK=iphoneos
|
|
|
|
APPLE_SDK=`echo ${SDK} |tr a-z A-Z`
|
2019-08-23 00:56:57 +08:00
|
|
|
CC="xcrun --sdk ${SDK} clang ${CPUS} -fembed-bitcode -DAPPLE_SDK_${APPLE_SDK}=1 -I${IOSINC} -miphoneos-version-min=10.0"
|
2015-12-28 09:00:54 +08:00
|
|
|
echo $CC $*
|
|
|
|
${CC} $*
|
|
|
|
r=$?
|
2019-08-23 00:56:57 +08:00
|
|
|
[ "$r" != 0 ] && echo ${CC} $* >&2
|
2018-10-21 20:56:56 +08:00
|
|
|
exit $r
|