Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05c62fc0 authored by Justin Yun's avatar Justin Yun
Browse files

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 65c680e2)
parent ac110973
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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