Revert "Deduplicate APEX variants that would build identically"

This reverts commit d6b2525b00.

Reason for revert: <Breaks tests - confirmed by Forrest: b/165188843>

Change-Id: I7cb68cb87522415004390c0672dc774e0067b122
This commit is contained in:
Pete Bentley
2020-08-18 13:44:59 +00:00
parent d6b2525b00
commit 0c7b26e0e2
12 changed files with 108 additions and 394 deletions

View File

@@ -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()
depInSameApexes := android.DirectlyInAllApexes(c.InApexes(), depName)
depInSameApex := android.DirectlyInApex(c.ApexVariationName(), 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 when the parent is in any APEX that
// the child is not in.
useThisDep = (depInSameApexes != depIsStubs)
// If building for APEX, use stubs only when it is not from
// the same APEX
useThisDep = (depInSameApex != depIsStubs)
}
// when to use (unspecified) stubs, check min_sdk_version and choose the right one
@@ -2895,16 +2895,6 @@ 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 &&

View File

@@ -556,10 +556,6 @@ func (compiler *baseCompiler) hasSrcExt(ext string) bool {
return false
}
func (compiler *baseCompiler) uniqueApexVariations() bool {
return Bool(compiler.Properties.Use_apex_name_macro)
}
// makeDefineString transforms a name of an APEX module into a value to be used as value for C define
// For example, com.android.foo => COM_ANDROID_FOO
func makeDefineString(name string) string {