Convert cc_aconfig_library to bazel.
Bug: 297358249 Test: Unit test and CI Change-Id: Ic84128b0df16efe4255b52b83670ec9902c09383
This commit is contained in:
11
cc/cc.go
11
cc/cc.go
@@ -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:
|
||||
|
@@ -28,9 +28,8 @@ func GeneratedCcLibraryModuleFactory(moduleName string, callbacks Generator) and
|
||||
staticAndSharedLibrarySdkMemberType,
|
||||
}
|
||||
|
||||
// TODO: Need to be bazelable
|
||||
// module.bazelable = true
|
||||
// module.bazelHandler = &ccLibraryBazelHandler{module: module}
|
||||
module.bazelable = true
|
||||
module.bazelHandler = &ccLibraryBazelHandler{module: module}
|
||||
|
||||
module.generators = append(module.generators, callbacks)
|
||||
|
||||
|
Reference in New Issue
Block a user