2018-06-10 07:07:46 +08:00
|
|
|
#!/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"
|
2019-02-11 07:09:46 +08:00
|
|
|
if [ "$SDK" = "iphoneos" ]; then
|
|
|
|
LD="$LD -ios_version_min 10.0"
|
|
|
|
else
|
|
|
|
LD="$LD -ios_simulator_version_min 10.0"
|
|
|
|
fi
|
2018-06-10 07:07:46 +08:00
|
|
|
echo "$LD $*"
|
|
|
|
${LD} $*
|
|
|
|
r=$?
|
|
|
|
if [ "$r" != 0 ]; then
|
|
|
|
echo ${LD} $* >&2
|
|
|
|
fi
|
|
|
|
exit $r
|