Loading android/defaults.go +10 −2 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ func InitDefaultableModule(module DefaultableModule) { if module.base().module == nil { panic("InitAndroidModule must be called before InitDefaultableModule") } module.setProperties(module.GetProperties(), module.base().variableProperties) module.AddProperties(module.defaults()) Loading @@ -118,6 +119,11 @@ type DefaultsVisibilityProperties struct { type DefaultsModuleBase struct { DefaultableModuleBase // Included to support setting bazel_module.label for multiple Soong modules to the same Bazel // target. This is primarily useful for modules that were architecture specific and instead are // handled in Bazel as a select(). BazelModuleBase } // The common pattern for defaults modules is to register separate instances of Loading Loading @@ -160,6 +166,7 @@ func (d *DefaultsModuleBase) isDefaults() bool { type DefaultsModule interface { Module Defaults Bazelable } func (d *DefaultsModuleBase) properties() []interface{} { Loading @@ -170,8 +177,7 @@ func (d *DefaultsModuleBase) productVariableProperties() interface{} { return d.defaultableVariableProperties } func (d *DefaultsModuleBase) GenerateAndroidBuildActions(ctx ModuleContext) { } func (d *DefaultsModuleBase) GenerateAndroidBuildActions(ctx ModuleContext) {} // ConvertWithBp2build to fulfill Bazelable interface; however, at this time defaults module are // *NOT* converted with bp2build Loading @@ -186,6 +192,8 @@ func InitDefaultsModule(module DefaultsModule) { &ApexProperties{}, &distProperties{}) // Bazel module must be initialized _before_ Defaults to be included in cc_defaults module. InitBazelModule(module) initAndroidModuleBase(module) initProductVariableModule(module) initArchModule(module) Loading cc/cc.go +0 −6 Original line number Diff line number Diff line Loading @@ -3496,10 +3496,6 @@ func (c *Module) ConvertWithBp2build(ctx android.TopDownMutatorContext) { type Defaults struct { android.ModuleBase android.DefaultsModuleBase // Included to support setting bazel_module.label for multiple Soong modules to the same Bazel // target. This is primarily useful for modules that were architecture specific and instead are // handled in Bazel as a select(). android.BazelModuleBase android.ApexModuleBase } Loading Loading @@ -3547,8 +3543,6 @@ func DefaultsFactory(props ...interface{}) android.Module { &prebuiltLinkerProperties{}, ) // Bazel module must be initialized _before_ Defaults to be included in cc_defaults module. android.InitBazelModule(module) android.InitDefaultsModule(module) return module Loading Loading
android/defaults.go +10 −2 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ func InitDefaultableModule(module DefaultableModule) { if module.base().module == nil { panic("InitAndroidModule must be called before InitDefaultableModule") } module.setProperties(module.GetProperties(), module.base().variableProperties) module.AddProperties(module.defaults()) Loading @@ -118,6 +119,11 @@ type DefaultsVisibilityProperties struct { type DefaultsModuleBase struct { DefaultableModuleBase // Included to support setting bazel_module.label for multiple Soong modules to the same Bazel // target. This is primarily useful for modules that were architecture specific and instead are // handled in Bazel as a select(). BazelModuleBase } // The common pattern for defaults modules is to register separate instances of Loading Loading @@ -160,6 +166,7 @@ func (d *DefaultsModuleBase) isDefaults() bool { type DefaultsModule interface { Module Defaults Bazelable } func (d *DefaultsModuleBase) properties() []interface{} { Loading @@ -170,8 +177,7 @@ func (d *DefaultsModuleBase) productVariableProperties() interface{} { return d.defaultableVariableProperties } func (d *DefaultsModuleBase) GenerateAndroidBuildActions(ctx ModuleContext) { } func (d *DefaultsModuleBase) GenerateAndroidBuildActions(ctx ModuleContext) {} // ConvertWithBp2build to fulfill Bazelable interface; however, at this time defaults module are // *NOT* converted with bp2build Loading @@ -186,6 +192,8 @@ func InitDefaultsModule(module DefaultsModule) { &ApexProperties{}, &distProperties{}) // Bazel module must be initialized _before_ Defaults to be included in cc_defaults module. InitBazelModule(module) initAndroidModuleBase(module) initProductVariableModule(module) initArchModule(module) Loading
cc/cc.go +0 −6 Original line number Diff line number Diff line Loading @@ -3496,10 +3496,6 @@ func (c *Module) ConvertWithBp2build(ctx android.TopDownMutatorContext) { type Defaults struct { android.ModuleBase android.DefaultsModuleBase // Included to support setting bazel_module.label for multiple Soong modules to the same Bazel // target. This is primarily useful for modules that were architecture specific and instead are // handled in Bazel as a select(). android.BazelModuleBase android.ApexModuleBase } Loading Loading @@ -3547,8 +3543,6 @@ func DefaultsFactory(props ...interface{}) android.Module { &prebuiltLinkerProperties{}, ) // Bazel module must be initialized _before_ Defaults to be included in cc_defaults module. android.InitBazelModule(module) android.InitDefaultsModule(module) return module Loading