From 13306af0c1dab3948146de93cbbeaadeba37011e Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Wed, 30 Mar 2016 14:13:50 -0700 Subject: [PATCH] Add LOCAL_NDK_VERSION. Used to select between releases of the NDK (r10, r11, etc). Some of the libraries we use in Android come as prebuilts from google3, which are most likely built against an older NDK than what we have in the platform. Since things may not be ABI compatible release to release, we need to keep legacy versions accessible for those to keep building. Change-Id: Ia3df42fa6f3a7bd5108ff6bbb0f2ca06239c3be9 --- core/binary.mk | 7 ++----- core/clear_vars.mk | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/core/binary.mk b/core/binary.mk index 14c2b54a2..6d4952170 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -66,14 +66,11 @@ my_ndk_sysroot := my_ndk_sysroot_include := my_ndk_sysroot_lib := ifdef LOCAL_SDK_VERSION - ifdef LOCAL_NDK_VERSION - $(error $(LOCAL_PATH): LOCAL_NDK_VERSION is now retired.) - endif ifdef LOCAL_IS_HOST_MODULE $(error $(LOCAL_PATH): LOCAL_SDK_VERSION cannot be used in host module) endif - my_ndk_source_root := $(HISTORICAL_NDK_VERSIONS_ROOT)/current/sources - my_ndk_sysroot := $(HISTORICAL_NDK_VERSIONS_ROOT)/current/platforms/android-$(LOCAL_SDK_VERSION)/arch-$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) + my_ndk_source_root := $(HISTORICAL_NDK_VERSIONS_ROOT)/$(LOCAL_NDK_VERSION)/sources + my_ndk_sysroot := $(HISTORICAL_NDK_VERSIONS_ROOT)/$(LOCAL_NDK_VERSION)/platforms/android-$(LOCAL_SDK_VERSION)/arch-$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH) my_ndk_sysroot_include := $(my_ndk_sysroot)/usr/include # x86_64 and and mips64 are both multilib toolchains, so their libraries are diff --git a/core/clear_vars.mk b/core/clear_vars.mk index dc44a1a1a..b961b129d 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -190,6 +190,7 @@ LOCAL_NOTICE_FILE:= # Used to replace the installed file of a presigned prebuilt apk in PDK fusion build, # to avoid installing the presigned apks with classes.dex unstripped. LOCAL_REPLACE_PREBUILT_APK_INSTALLED:= +LOCAL_NDK_VERSION:=current # arch specific variables LOCAL_SRC_FILES_$(TARGET_ARCH):=