From 09aaa26c060e785e65fda9506934b1303019e841 Mon Sep 17 00:00:00 2001 From: Kiyoung Kim Date: Tue, 13 Feb 2024 13:38:16 +0900 Subject: [PATCH] Move setting default BOARD_VNDK_VERSION value Current BOARD_VNDK_VERSION is being set from config.mk, but this is before build system loads release config and checks if VNDK is deprecated or not. Move this to envsetup so it can set up BOARD_VNDK_VERSION only when VNDK is not deprecated with flag. Bug: 324976878 Test: mainline release target build succeeded Change-Id: I490cc431038f5cebc40d03c98d2666eaba906664 --- core/config.mk | 13 ------------- core/envsetup.mk | 12 ++++++++++++ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/core/config.mk b/core/config.mk index b8d4865aa9..dbee0a07a3 100644 --- a/core/config.mk +++ b/core/config.mk @@ -374,19 +374,6 @@ ANDROID_BUILDSPEC := $(TOPDIR)buildspec.mk endif -include $(ANDROID_BUILDSPEC) -ifeq ($(KEEP_VNDK),true) - # Starting in Android U, non-VNDK devices not supported - # WARNING: DO NOT CHANGE: if you are downstream of AOSP, and you change this, without - # letting upstream know it's important to you, we may do cleanup which breaks this - # significantly. Please let us know if you are changing this. - ifndef BOARD_VNDK_VERSION - # READ WARNING - DO NOT CHANGE - BOARD_VNDK_VERSION := current - # READ WARNING - DO NOT CHANGE - endif -endif - - # --------------------------------------------------------------- # Define most of the global variables. These are the ones that # are specific to the user's build configuration. diff --git a/core/envsetup.mk b/core/envsetup.mk index c286135ebf..30a6c0679f 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -57,6 +57,18 @@ else KEEP_VNDK ?= true endif +ifeq ($(KEEP_VNDK),true) + # Starting in Android U, non-VNDK devices not supported + # WARNING: DO NOT CHANGE: if you are downstream of AOSP, and you change this, without + # letting upstream know it's important to you, we may do cleanup which breaks this + # significantly. Please let us know if you are changing this. + ifndef BOARD_VNDK_VERSION + # READ WARNING - DO NOT CHANGE + BOARD_VNDK_VERSION := current + # READ WARNING - DO NOT CHANGE + endif +endif + # --------------------------------------------------------------- # Set up version information include $(BUILD_SYSTEM)/version_util.mk