From 29555d5f33cff25de52721afd876e1a2ae1110c9 Mon Sep 17 00:00:00 2001 From: Yo Chiang Date: Wed, 6 May 2020 15:59:59 +0800 Subject: [PATCH] APEX should require base module of stub libraries Bug: 155841765 Bug: 7456955 Test: m nothing and check the content of out/soong/Android-*.mk Change-Id: I1f109c27a5e9bcfeb3a887b2e8d6a2cf983aa730 --- apex/apex.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apex/apex.go b/apex/apex.go index d196e95e9..88cb55bdc 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -2099,8 +2099,8 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { // // Always include if we are a host-apex however since those won't have any // system libraries. - if !android.DirectlyInAnyApex(ctx, cc.Name()) && !android.InList(cc.Name(), a.requiredDeps) { - a.requiredDeps = append(a.requiredDeps, cc.Name()) + if !android.DirectlyInAnyApex(ctx, cc.Name()) && !android.InList(cc.BaseModuleName(), a.requiredDeps) { + a.requiredDeps = append(a.requiredDeps, cc.BaseModuleName()) } requireNativeLibs = append(requireNativeLibs, cc.OutputFile().Path().Base()) // Don't track further