Merge "Set __ANDROID_API__ for vendor binaries to vndk version."

am: dad6450cd3

Change-Id: I564da2eeb8a5a727a1bae61b50d29072daf42c72
This commit is contained in:
Justin Yun 2018-03-27 01:31:37 +00:00 committed by android-build-merger
commit c050d6da06
1 changed files with 9 additions and 1 deletions

View File

@ -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