Merge "Don't use module names with "prebuilt_" prefixes in make dependencies."

This commit is contained in:
Treehugger Robot
2020-12-04 06:23:51 +00:00
committed by Gerrit Code Review
3 changed files with 65 additions and 1 deletions

View File

@@ -1099,6 +1099,19 @@ func (c *Module) ImplementationModuleName(ctx android.BaseModuleContext) string
return name
}
// Similar to ImplementationModuleName, but uses the Make variant of the module
// name as base name, for use in AndroidMk output. E.g. for a prebuilt module
// where the Soong name is prebuilt_foo, this returns foo (which works in Make
// under the premise that the prebuilt module overrides its source counterpart
// if it is exposed to Make).
func (c *Module) ImplementationModuleNameForMake(ctx android.BaseModuleContext) string {
name := c.BaseModuleName()
if versioned, ok := c.linker.(versionedInterface); ok {
name = versioned.implementationModuleName(name)
}
return name
}
func (c *Module) bootstrap() bool {
return Bool(c.Properties.Bootstrap)
}