From 2af509ba3d56ab5a31c2ec04feee1d43f4b2c1a9 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Sun, 19 Mar 2017 13:22:45 -0700 Subject: [PATCH] Ensure that BOARD_VNDK_VERSION is current BOARD_VNDK_VERSION controls which version of the VNDK is used for the build. We only support compiling against the current VNDK, and we don't support installing old prebuilt VNDK libraries yet, so ensure this variable is set to "current". Once we support installing old prebuilt VNDK libraries, we'll also need to disable building modules that use the VNDK. Test: build-aosp_arm.ninja is the same before/after Test: Ensure there are no boards that set BOARD_VNDK_VERSION Test: Set BOARD_VNDK_VERSION := invalid Change-Id: Ic26c9f44e356a0734f522b4538cb866d5b901d43 (cherry picked from commit 2c3289bf37f40220b0e097a49f1ab1ceabcf9dcd) --- core/binary.mk | 6 +++--- core/envsetup.mk | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/core/binary.mk b/core/binary.mk index 97f1c6fd5..3eb77604b 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -112,12 +112,12 @@ ifneq ($(LOCAL_SDK_VERSION)$(LOCAL_USE_VNDK),) # that for the generated libraries. Clip the API level to the minimum where # appropriate. ifdef LOCAL_USE_VNDK - my_ndk_api := $(BOARD_VNDK_VERSION) + my_ndk_api := current else my_ndk_api := $(LOCAL_SDK_VERSION) - endif - ifneq ($(my_ndk_api),current) + ifneq ($(my_ndk_api),current) my_ndk_api := $(call math_max,$(my_ndk_api),$(my_min_sdk_version)) + endif endif my_ndk_api_def := $(my_ndk_api) diff --git a/core/envsetup.mk b/core/envsetup.mk index 04bfe49cb..3d76fefbf 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -260,6 +260,13 @@ ifeq ($(AB_OTA_UPDATER),true) endif endif +# Check BOARD_VNDK_VERSION +ifdef BOARD_VNDK_VERSION + ifneq ($(BOARD_VNDK_VERSION),current) + $(error BOARD_VNDK_VERSION: Only "current" is implemented) + endif +endif + # --------------------------------------------------------------- # Set up configuration for target machine. # The following must be set: