Loading aconfig/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ bootstrap_go_package { "sbox_proto", "soong", "soong-android", "soong-bazel", ], srcs: [ "aconfig_declarations.go", Loading aconfig/aconfig_declarations.go +0 −26 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ import ( "strings" "android/soong/android" "android/soong/bazel" "github.com/google/blueprint" ) Loading @@ -27,7 +26,6 @@ import ( type DeclarationsModule struct { android.ModuleBase android.DefaultableModuleBase android.BazelModuleBase // Properties for "aconfig_declarations" properties struct { Loading @@ -53,7 +51,6 @@ func DeclarationsFactory() android.Module { android.InitAndroidModule(module) android.InitDefaultableModule(module) module.AddProperties(&module.properties) android.InitBazelModule(module) return module } Loading Loading @@ -232,26 +229,3 @@ func mergeAconfigFiles(ctx android.ModuleContext, inputs android.Paths) android. return android.Paths{output} } type bazelAconfigDeclarationsAttributes struct { Srcs bazel.LabelListAttribute Package string } func (module *DeclarationsModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) { if ctx.ModuleType() != "aconfig_declarations" { return } srcs := bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, module.properties.Srcs)) attrs := bazelAconfigDeclarationsAttributes{ Srcs: srcs, Package: module.properties.Package, } props := bazel.BazelTargetModuleProperties{ Rule_class: "aconfig_declarations", Bzl_load_location: "//build/bazel/rules/aconfig:aconfig_declarations.bzl", } ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, &attrs) } aconfig/aconfig_value_set.go +0 −23 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package aconfig import ( "android/soong/android" "android/soong/bazel" "github.com/google/blueprint" ) Loading @@ -24,7 +23,6 @@ import ( type ValueSetModule struct { android.ModuleBase android.DefaultableModuleBase android.BazelModuleBase properties struct { // aconfig_values modules Loading @@ -38,7 +36,6 @@ func ValueSetFactory() android.Module { android.InitAndroidModule(module) android.InitDefaultableModule(module) module.AddProperties(&module.properties) android.InitBazelModule(module) return module } Loading Loading @@ -91,23 +88,3 @@ func (module *ValueSetModule) GenerateAndroidBuildActions(ctx android.ModuleCont AvailablePackages: packages, }) } type bazelAconfigValueSetAttributes struct { Values bazel.LabelListAttribute } func (module *ValueSetModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) { if ctx.ModuleType() != "aconfig_value_set" { return } attrs := bazelAconfigValueSetAttributes{ Values: bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, module.properties.Values)), } props := bazel.BazelTargetModuleProperties{ Rule_class: "aconfig_value_set", Bzl_load_location: "//build/bazel/rules/aconfig:aconfig_value_set.bzl", } ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, &attrs) } aconfig/aconfig_values.go +0 −27 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package aconfig import ( "android/soong/android" "android/soong/bazel" "github.com/google/blueprint" ) Loading @@ -24,7 +23,6 @@ import ( type ValuesModule struct { android.ModuleBase android.DefaultableModuleBase android.BazelModuleBase properties struct { // aconfig files, relative to this Android.bp file Loading @@ -41,7 +39,6 @@ func ValuesFactory() android.Module { android.InitAndroidModule(module) android.InitDefaultableModule(module) module.AddProperties(&module.properties) android.InitBazelModule(module) return module } Loading Loading @@ -69,27 +66,3 @@ func (module *ValuesModule) GenerateAndroidBuildActions(ctx android.ModuleContex } ctx.SetProvider(valuesProviderKey, providerData) } type bazelAconfigValuesAttributes struct { Srcs bazel.LabelListAttribute Package string } func (module *ValuesModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) { if ctx.ModuleType() != "aconfig_values" { return } srcs := bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, module.properties.Srcs)) attrs := bazelAconfigValuesAttributes{ Srcs: srcs, Package: module.properties.Package, } props := bazel.BazelTargetModuleProperties{ Rule_class: "aconfig_values", Bzl_load_location: "//build/bazel/rules/aconfig:aconfig_values.bzl", } ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, &attrs) } aconfig/codegen/cc_aconfig_library.go +0 −39 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package codegen import ( "android/soong/aconfig" "android/soong/android" "android/soong/bazel" "android/soong/cc" "github.com/google/blueprint" Loading Loading @@ -144,41 +143,3 @@ func (this *CcAconfigLibraryCallbacks) GeneratorBuildActions(ctx cc.ModuleContex }, }) } type bazelCcAconfigLibraryAttributes struct { cc.SdkAttributes Aconfig_declarations bazel.LabelAttribute Dynamic_deps bazel.LabelListAttribute } // Convert the cc_aconfig_library module to bazel. // // This method is called from cc.ConvertWithBp2build to actually convert the // cc_aconfig_library module. This is necessary since the factory method of this // module type returns a cc library and the bp2build conversion is called on the // cc library type. func (this *CcAconfigLibraryCallbacks) GeneratorBp2build(ctx android.Bp2buildMutatorContext, module *cc.Module) bool { if ctx.ModuleType() != "cc_aconfig_library" { return false } attrs := bazelCcAconfigLibraryAttributes{ SdkAttributes: cc.Bp2BuildParseSdkAttributes(module), Aconfig_declarations: *bazel.MakeLabelAttribute(android.BazelLabelForModuleDepSingle(ctx, this.properties.Aconfig_declarations).Label), Dynamic_deps: bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, []string{baseLibDep})), } props := bazel.BazelTargetModuleProperties{ Rule_class: "cc_aconfig_library", Bzl_load_location: "//build/bazel/rules/cc:cc_aconfig_library.bzl", } ctx.CreateBazelTargetModule( props, android.CommonAttributes{ Name: ctx.ModuleName(), Tags: android.ApexAvailableTagsWithoutTestApexes(ctx, module), }, &attrs) return true } Loading
aconfig/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ bootstrap_go_package { "sbox_proto", "soong", "soong-android", "soong-bazel", ], srcs: [ "aconfig_declarations.go", Loading
aconfig/aconfig_declarations.go +0 −26 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ import ( "strings" "android/soong/android" "android/soong/bazel" "github.com/google/blueprint" ) Loading @@ -27,7 +26,6 @@ import ( type DeclarationsModule struct { android.ModuleBase android.DefaultableModuleBase android.BazelModuleBase // Properties for "aconfig_declarations" properties struct { Loading @@ -53,7 +51,6 @@ func DeclarationsFactory() android.Module { android.InitAndroidModule(module) android.InitDefaultableModule(module) module.AddProperties(&module.properties) android.InitBazelModule(module) return module } Loading Loading @@ -232,26 +229,3 @@ func mergeAconfigFiles(ctx android.ModuleContext, inputs android.Paths) android. return android.Paths{output} } type bazelAconfigDeclarationsAttributes struct { Srcs bazel.LabelListAttribute Package string } func (module *DeclarationsModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) { if ctx.ModuleType() != "aconfig_declarations" { return } srcs := bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, module.properties.Srcs)) attrs := bazelAconfigDeclarationsAttributes{ Srcs: srcs, Package: module.properties.Package, } props := bazel.BazelTargetModuleProperties{ Rule_class: "aconfig_declarations", Bzl_load_location: "//build/bazel/rules/aconfig:aconfig_declarations.bzl", } ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, &attrs) }
aconfig/aconfig_value_set.go +0 −23 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package aconfig import ( "android/soong/android" "android/soong/bazel" "github.com/google/blueprint" ) Loading @@ -24,7 +23,6 @@ import ( type ValueSetModule struct { android.ModuleBase android.DefaultableModuleBase android.BazelModuleBase properties struct { // aconfig_values modules Loading @@ -38,7 +36,6 @@ func ValueSetFactory() android.Module { android.InitAndroidModule(module) android.InitDefaultableModule(module) module.AddProperties(&module.properties) android.InitBazelModule(module) return module } Loading Loading @@ -91,23 +88,3 @@ func (module *ValueSetModule) GenerateAndroidBuildActions(ctx android.ModuleCont AvailablePackages: packages, }) } type bazelAconfigValueSetAttributes struct { Values bazel.LabelListAttribute } func (module *ValueSetModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) { if ctx.ModuleType() != "aconfig_value_set" { return } attrs := bazelAconfigValueSetAttributes{ Values: bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, module.properties.Values)), } props := bazel.BazelTargetModuleProperties{ Rule_class: "aconfig_value_set", Bzl_load_location: "//build/bazel/rules/aconfig:aconfig_value_set.bzl", } ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, &attrs) }
aconfig/aconfig_values.go +0 −27 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package aconfig import ( "android/soong/android" "android/soong/bazel" "github.com/google/blueprint" ) Loading @@ -24,7 +23,6 @@ import ( type ValuesModule struct { android.ModuleBase android.DefaultableModuleBase android.BazelModuleBase properties struct { // aconfig files, relative to this Android.bp file Loading @@ -41,7 +39,6 @@ func ValuesFactory() android.Module { android.InitAndroidModule(module) android.InitDefaultableModule(module) module.AddProperties(&module.properties) android.InitBazelModule(module) return module } Loading Loading @@ -69,27 +66,3 @@ func (module *ValuesModule) GenerateAndroidBuildActions(ctx android.ModuleContex } ctx.SetProvider(valuesProviderKey, providerData) } type bazelAconfigValuesAttributes struct { Srcs bazel.LabelListAttribute Package string } func (module *ValuesModule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) { if ctx.ModuleType() != "aconfig_values" { return } srcs := bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, module.properties.Srcs)) attrs := bazelAconfigValuesAttributes{ Srcs: srcs, Package: module.properties.Package, } props := bazel.BazelTargetModuleProperties{ Rule_class: "aconfig_values", Bzl_load_location: "//build/bazel/rules/aconfig:aconfig_values.bzl", } ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, &attrs) }
aconfig/codegen/cc_aconfig_library.go +0 −39 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package codegen import ( "android/soong/aconfig" "android/soong/android" "android/soong/bazel" "android/soong/cc" "github.com/google/blueprint" Loading Loading @@ -144,41 +143,3 @@ func (this *CcAconfigLibraryCallbacks) GeneratorBuildActions(ctx cc.ModuleContex }, }) } type bazelCcAconfigLibraryAttributes struct { cc.SdkAttributes Aconfig_declarations bazel.LabelAttribute Dynamic_deps bazel.LabelListAttribute } // Convert the cc_aconfig_library module to bazel. // // This method is called from cc.ConvertWithBp2build to actually convert the // cc_aconfig_library module. This is necessary since the factory method of this // module type returns a cc library and the bp2build conversion is called on the // cc library type. func (this *CcAconfigLibraryCallbacks) GeneratorBp2build(ctx android.Bp2buildMutatorContext, module *cc.Module) bool { if ctx.ModuleType() != "cc_aconfig_library" { return false } attrs := bazelCcAconfigLibraryAttributes{ SdkAttributes: cc.Bp2BuildParseSdkAttributes(module), Aconfig_declarations: *bazel.MakeLabelAttribute(android.BazelLabelForModuleDepSingle(ctx, this.properties.Aconfig_declarations).Label), Dynamic_deps: bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, []string{baseLibDep})), } props := bazel.BazelTargetModuleProperties{ Rule_class: "cc_aconfig_library", Bzl_load_location: "//build/bazel/rules/cc:cc_aconfig_library.bzl", } ctx.CreateBazelTargetModule( props, android.CommonAttributes{ Name: ctx.ModuleName(), Tags: android.ApexAvailableTagsWithoutTestApexes(ctx, module), }, &attrs) return true }