Skip product variant for core-variant VNDK

VNDK "mustUseVendorVariant" option checks only for the vendor
variant. Since the product variant of the VNDK is skipped from
installing, we don't need check product variant for
"mustUseVendorVariant" check.

Bug: 176268903
Test: m libxml2.product
      m libxml2.vendor
Change-Id: I3b10f0579aceca1fb32fa4d6fb21dc020a35874d
This commit is contained in:
Justin Yun
2020-12-24 16:11:23 +09:00
parent 2187e41f05
commit 31094b10d2

View File

@@ -1400,8 +1400,9 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
}
}
// In some cases we want to use core variant for VNDK-Core libs
if ctx.isVndk() && !ctx.isVndkSp() && !ctx.IsVndkExt() {
// In some cases we want to use core variant for VNDK-Core libs.
// Skip product variant since VNDKs use only the vendor variant.
if ctx.isVndk() && !ctx.isVndkSp() && !ctx.IsVndkExt() && !ctx.inProduct() {
mayUseCoreVariant := true
if ctx.mustUseVendorVariant() {