Apply toNinjaName for variant names

Variant names are part of the name of the generated Ninja rule.
toNinjaName needs to be applied to it as well.

Test: presubmit
Change-Id: I4fb908b6824179440b1c207240bad59dc85009fa
This commit is contained in:
Yi Kong 2021-12-21 15:50:57 +08:00
parent 6dd6868dec
commit a08e722192

View file

@ -2814,8 +2814,9 @@ func (c *Context) generateModuleBuildActions(config interface{},
func(module *moduleInfo, pause chan<- pauseSpec) bool {
uniqueName := c.nameInterface.UniqueName(newNamespaceContext(module), module.group.name)
sanitizedName := toNinjaName(uniqueName)
sanitizedVariant := toNinjaName(module.variant.name)
prefix := moduleNamespacePrefix(sanitizedName + "_" + module.variant.name)
prefix := moduleNamespacePrefix(sanitizedName + "_" + sanitizedVariant)
// The parent scope of the moduleContext's local scope gets overridden to be that of the
// calling Go package on a per-call basis. Since the initial parent scope doesn't matter we