From bc093672ede984b2eede4e17add867a55db40738 Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Fri, 1 Nov 2019 11:29:44 +0900 Subject: [PATCH] Fix vendor variants generation of vndk Current routine to check whether BOARD_VNDK_VERSION variant is created or not is not correct, because only non-VNDK modules are installed in /vendor. Thus, BOARD_VNDK_VERSION variants should only be created with non-VNDK modules. Bug: N/A Test: m nothing Change-Id: I2ee7821fce407214ac6be4f4b6d62483c907971f --- cc/cc.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cc/cc.go b/cc/cc.go index a312c49aa..5dfc56386 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -2653,7 +2653,11 @@ func ImageMutator(mctx android.BottomUpMutatorContext) { // or a /system directory that is available to vendor. coreVariantNeeded = true vendorVariants = append(vendorVariants, platformVndkVersion) - if m.IsVndk() { + // VNDK modules must not create BOARD_VNDK_VERSION variant because its + // code is PLATFORM_VNDK_VERSION. + // On the other hand, vendor_available modules which are not VNDK should + // also build BOARD_VNDK_VERSION because it's installed in /vendor. + if !m.IsVndk() { vendorVariants = append(vendorVariants, deviceVndkVersion) } } else if vendorSpecific && String(m.Properties.Sdk_version) == "" {