packaging: install/package deps if not marked IsHideFromMake

TransitivePackagingSpecs() gathers transitive "install/package"
dependencies.

Previously, IsInstallDepNeeded(depTag) was checked. But, in this way,
some stub libraries which are marked as "HideFromMake()" to avoid
install/package can be gathered.

For example, libdexfile is not installed even if it is one of
libdexfile_support's runtime_libs because it is a stub library and the
impl is provided by "art" apex.

So when gathering transitive deps "IsHideFromMake()" is checked and if
the dep is hidden (so, not supposed to be installed) then the dep
(and its deps) is ignored.

Bug: 187686926
Test: m nothing
Test: m microdroid (libdexfile shouldn't be included in system/lib)
Test: m hosttar (no changes)
Change-Id: I2729001d4c64985cf0f2b37440c2082fe912e6c5
This commit is contained in:
Jooyung Han
2021-05-12 03:53:32 +09:00
parent df09d173ca
commit 77f7c44246

View File

@@ -1500,7 +1500,7 @@ func (m *ModuleBase) computeInstallDeps(ctx ModuleContext) ([]*installPathsDepSe
var installDeps []*installPathsDepSet
var packagingSpecs []*packagingSpecsDepSet
ctx.VisitDirectDeps(func(dep Module) {
if IsInstallDepNeeded(ctx.OtherModuleDependencyTag(dep)) {
if IsInstallDepNeeded(ctx.OtherModuleDependencyTag(dep)) && !dep.IsHideFromMake() {
installDeps = append(installDeps, dep.base().installFilesDepSet)
packagingSpecs = append(packagingSpecs, dep.base().packagingSpecsDepSet)
}