aboutsummaryrefslogtreecommitdiffstats
path: root/core/binary.mk
diff options
context:
space:
mode:
authorJustin Yun <justinyun@google.com>2018-03-20 07:16:14 +0900
committerJustin Yun <justinyun@google.com>2018-03-28 23:03:22 +0000
commit05c62fc0f4eebe8e7497936821a59fc7b7d70994 (patch)
tree263920613e1c9f9022f1f5b0a88681e41e93a898 /core/binary.mk
parentac1109733dfd87024693bcbd821c99cdee5c8875 (diff)
downloadplatform_build-05c62fc0f4eebe8e7497936821a59fc7b7d70994.tar.gz
platform_build-05c62fc0f4eebe8e7497936821a59fc7b7d70994.tar.bz2
platform_build-05c62fc0f4eebe8e7497936821a59fc7b7d70994.zip
Set __ANDROID_API__ for vendor binaries to vndk version.
When building vendor modules with BOARD_VNDK_VERSION=current, the API of the vendor modules will be current PLATFORM_VNDK_VERSION. __ANDROID_API_FUTURE__ will be used as before if the version is a CODENAME. If BOARD_VNDK_VERSION is not "current", that means the VNDK version of the vendor modules is BOARD_VNDK_VERSION. Bug: 74833244 Test: Build and check boot. Change-Id: Iccc603f1b5ffa066e74ba1357f3fbbcc13c58f76 Merged-In: Iccc603f1b5ffa066e74ba1357f3fbbcc13c58f76 (cherry picked from commit 65c680e28568a5333bbf0c3e20d9be3ae3dcad7c)
Diffstat (limited to 'core/binary.mk')
-rw-r--r--core/binary.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/binary.mk b/core/binary.mk
index c2fa27c1dc..97429c3ae9 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -225,7 +225,15 @@ ifneq ($(LOCAL_SDK_VERSION),)
endif
ifneq ($(LOCAL_USE_VNDK),)
- my_cflags += -D__ANDROID_API__=__ANDROID_API_FUTURE__ -D__ANDROID_VNDK__
+ # Required VNDK version for vendor modules is BOARD_VNDK_VERSION.
+ my_vndk_version := $(BOARD_VNDK_VERSION)
+ ifeq ($(my_vndk_version),current)
+ # Build with current PLATFORM_VNDK_VERSION.
+ # If PLATFORM_VNDK_VERSION has a CODENAME, it will return
+ # __ANDROID_API_FUTURE__.
+ my_vndk_version := $(call codename-or-sdk-to-sdk,$(PLATFORM_VNDK_VERSION))
+ endif
+ my_cflags += -D__ANDROID_API__=$(my_vndk_version) -D__ANDROID_VNDK__
endif
ifndef LOCAL_IS_HOST_MODULE