Convert cc_aconfig_library to bazel.

Bug: 297358249
Test: Unit test and CI
Change-Id: Ic84128b0df16efe4255b52b83670ec9902c09383
This commit is contained in:
Yu Liu
2023-09-14 15:10:03 -07:00
parent f2d858e5ba
commit 855cfc2fac
6 changed files with 94 additions and 5 deletions

View File

@@ -589,6 +589,7 @@ type Generator interface {
GeneratorFlags(ctx ModuleContext, flags Flags, deps PathDeps) Flags
GeneratorSources(ctx ModuleContext) GeneratedSource
GeneratorBuildActions(ctx ModuleContext, flags Flags, deps PathDeps)
GeneratorBp2build(ctx android.Bp2buildMutatorContext) bool
}
// compiler is the interface for a compiler helper object. Different module decorators may implement
@@ -4215,6 +4216,16 @@ func (c *Module) typ() moduleType {
// ConvertWithBp2build converts Module to Bazel for bp2build.
func (c *Module) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
if len(c.generators) > 0 {
allConverted := true
for _, generator := range c.generators {
allConverted = allConverted && generator.GeneratorBp2build(ctx)
}
if allConverted {
return
}
}
prebuilt := c.IsPrebuilt()
switch c.typ() {
case binary: