diff options
Diffstat (limited to 'cc/cc.go')
-rw-r--r-- | cc/cc.go | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -2390,7 +2390,7 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps { if ccDep.CcLibrary() && !libDepTag.static() { depIsStubs := ccDep.BuildStubs() depHasStubs := VersionVariantAvailable(c) && ccDep.HasStubsVariants() - depInSameApex := android.DirectlyInApex(c.ApexVariationName(), depName) + depInSameApexes := android.DirectlyInAllApexes(c.InApexes(), depName) depInPlatform := !android.DirectlyInAnyApex(ctx, depName) var useThisDep bool @@ -2420,9 +2420,9 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps { } } } else { - // If building for APEX, use stubs only when it is not from - // the same APEX - useThisDep = (depInSameApex != depIsStubs) + // If building for APEX, use stubs when the parent is in any APEX that + // the child is not in. + useThisDep = (depInSameApexes != depIsStubs) } // when to use (unspecified) stubs, check min_sdk_version and choose the right one @@ -2895,6 +2895,16 @@ func (c *Module) TestFor() []string { } } +func (c *Module) UniqueApexVariations() bool { + if u, ok := c.compiler.(interface { + uniqueApexVariations() bool + }); ok { + return u.uniqueApexVariations() + } else { + return false + } +} + // Return true if the module is ever installable. func (c *Module) EverInstallable() bool { return c.installer != nil && |