Fix the names of the dynamically inherited modules.
The module name passed to rbld.inherit should be its path without the suffix. Bug: 215182113 Test: internal Change-Id: Ic65a5b73037be84f31f8db29f71f793b6c6034bb
This commit is contained in:
@@ -54,6 +54,10 @@ func (im moduleInfo) entryName() string {
|
||||
return im.moduleLocalName + "_init"
|
||||
}
|
||||
|
||||
func (mi moduleInfo) name() string {
|
||||
return fmt.Sprintf("%q", MakePath2ModuleName(mi.originalPath))
|
||||
}
|
||||
|
||||
type inheritedModule interface {
|
||||
name() string
|
||||
entryName() string
|
||||
@@ -67,10 +71,6 @@ type inheritedStaticModule struct {
|
||||
loadAlways bool
|
||||
}
|
||||
|
||||
func (im inheritedStaticModule) name() string {
|
||||
return fmt.Sprintf("%q", MakePath2ModuleName(im.originalPath))
|
||||
}
|
||||
|
||||
func (im inheritedStaticModule) emitSelect(_ *generationContext) {
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ func (i inheritedDynamicModule) emitSelect(gctx *generationContext) {
|
||||
gctx.indentLevel++
|
||||
for _, mi := range i.candidateModules {
|
||||
gctx.newLine()
|
||||
gctx.writef(`"%s": (%q, %s),`, mi.originalPath, mi.moduleLocalName, mi.entryName())
|
||||
gctx.writef(`"%s": (%s, %s),`, mi.originalPath, mi.name(), mi.entryName())
|
||||
}
|
||||
gctx.indentLevel--
|
||||
gctx.newLine()
|
||||
|
Reference in New Issue
Block a user