[simulator/android] Use NDK version 16 when available

This commit is contained in:
Romain Goyet
2019-11-12 15:27:18 +01:00
committed by LeaNumworks
parent 0736a3f55a
commit 5eb0e4f3ff

View File

@@ -9,20 +9,26 @@ endif
NDK_TOOLCHAIN_PATH = $(NDK_PATH)/toolchains/llvm/prebuilt/$(NDK_HOST_TAG)/bin
# No 64 bit device has ever shipped with an API level < 21. Consequently, there
# is no toolchain for those archs on those API levels. Let's enforce NDK_VERSION
# at 21 for these archs, and 16 for the others.
ifeq ($(NDK_ABI),armeabi-v7a)
NDK_TARGET = armv7a-linux-androideabi
NDK_VERSION = 16
else ifeq ($(NDK_ABI),arm64-v8a)
NDK_TARGET = aarch64-linux-android
NDK_VERSION = 21
else ifeq ($(NDK_ABI),x86)
NDK_TARGET = i686-linux-android
NDK_VERSION = 16
else ifeq ($(NDK_ABI),x86_64)
NDK_TARGET = x86_64-linux-android
NDK_VERSION = 21
endif
ifdef NDK_TARGET
NDK_VERSION ?= 21
CC = $(NDK_TOOLCHAIN_PATH)/$(NDK_TARGET)$(NDK_VERSION)-clang
CXX = $(NDK_TOOLCHAIN_PATH)/$(NDK_TARGET)$(NDK_VERSION)-clang++
LD = $(NDK_TOOLCHAIN_PATH)/$(NDK_TARGET)$(NDK_VERSION)-clang++