From 03b6cba1f244f492d3c0009e4254c3f247d733a2 Mon Sep 17 00:00:00 2001 From: Kiyoung Kim Date: Fri, 6 Oct 2023 14:12:43 +0900 Subject: [PATCH] Disable TARGET_VNDK_USE_CORE_VARIANT if VNDK is deprecated TARGET_VNDK_USE_CORE_VARIANT enables vendor to use some of the VNDK libraries with core variant installed in /system/lib. However, this does not make sense when VNDK is deprecated. This change is to ignore TARGET_VNDK_USE_CORE_VARIANT when the VNDK is deprecated. Bug: 303754049 Test: aosp_cf_x86_go_phone boot succeeded Change-Id: Ie9fa75e0fa452e48924d51d64201690ffb271f33 --- android/config.go | 2 +- cc/cc_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/android/config.go b/android/config.go index ed9b7b0e3..4c1f9a973 100644 --- a/android/config.go +++ b/android/config.go @@ -1444,7 +1444,7 @@ func (c *deviceConfig) ExtraVndkVersions() []string { } func (c *deviceConfig) VndkUseCoreVariant() bool { - return Bool(c.config.productVariables.VndkUseCoreVariant) + return Bool(c.config.productVariables.VndkUseCoreVariant) && Bool(c.config.productVariables.KeepVndk) } func (c *deviceConfig) SystemSdkVersions() []string { diff --git a/cc/cc_test.go b/cc/cc_test.go index 7ce0f3715..cf618af58 100644 --- a/cc/cc_test.go +++ b/cc/cc_test.go @@ -707,6 +707,7 @@ func TestVndkUsingCoreVariant(t *testing.T) { config.TestProductVariables.DeviceVndkVersion = StringPtr("current") config.TestProductVariables.Platform_vndk_version = StringPtr("29") config.TestProductVariables.VndkUseCoreVariant = BoolPtr(true) + config.TestProductVariables.KeepVndk = BoolPtr(true) setVndkMustUseVendorVariantListForTest(config, []string{"libvndk"})