Commit ecb66270 authored by Thomas Guillem's avatar Thomas Guillem

build: update toolchain if ndk changes

parent d1eb581b
......@@ -285,19 +285,31 @@ else
exit 1
fi
NDK_FORCE_ARG=
NDK_TOOLCHAIN_DIR=${PWD}/toolchains/${PLATFORM_SHORT_ARCH}
NDK_TOOLCHAIN_PROPS=${NDK_TOOLCHAIN_DIR}/source.properties
NDK_TOOLCHAIN_PATH=${NDK_TOOLCHAIN_DIR}/bin
NDK_SUPPORT_DIR=${NDK_TOOLCHAIN_DIR}/include/support
if [ "`cat \"${NDK_TOOLCHAIN_PROPS}\" 2>/dev/null`" != "`cat \"${ANDROID_NDK}/source.properties\"`" ];then
echo "NDK changed, making new toolchain"
NDK_FORCE_ARG="--force"
fi
$ANDROID_NDK/build/tools/make_standalone_toolchain.py \
--arch ${PLATFORM_SHORT_ARCH} \
--api ${ANDROID_API} \
--stl libc++ \
${NDK_FORCE_ARG} \
--install-dir ${NDK_TOOLCHAIN_DIR} 2> /dev/null
if [ ! -d ${NDK_TOOLCHAIN_PATH} ];
then
echo "make_standalone_toolchain.py failed"
exit 1
fi
if [ ! -z "${NDK_FORCE_ARG}" ];then
cp "$ANDROID_NDK/source.properties" "${NDK_TOOLCHAIN_PROPS}"
fi
if [ ! -f ${NDK_TOOLCHAIN_DIR}/sysroot/usr/include/uchar.h ];
then
cp ${ANDROID_NDK}/platforms/android-24/arch-${PLATFORM_SHORT_ARCH}/usr/include/uchar.h \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment