Convert cc_aconfig_library to bazel.
Bug: 297358249
Test: Unit test and CI
Change-Id: Ic84128b0df16efe4255b52b83670ec9902c09383
diff --git a/cc/cc.go b/cc/cc.go
index 9aa0cac..81a6cd6 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -589,6 +589,7 @@
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 @@
// 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: