Have ConvertWBp2build use Bp2buildMutatorContext
This no-op refactoring facilitates some upcoming functional changes for "bp2build allowlist v2". The work requires that the bp2build conversion mutator be changed from a TopDown mutator to a BottomUp mutator. Refactoring all bp2build-related methods so that they use Bp2buildMutatorContext makes it easier to make this functional change without touching tens of files and multiple projects. Bug: 285631638 Test: m bp2build Change-Id: I3d1ef3064146e959c6f0dc315350fc9764bf2bd2
This commit is contained in:
@@ -308,7 +308,7 @@ func stripAttrsFromLinkerAttrs(la *linkerAttributes) stripAttributes {
|
||||
}
|
||||
}
|
||||
|
||||
func libraryBp2Build(ctx android.TopDownMutatorContext, m *Module) {
|
||||
func libraryBp2Build(ctx android.Bp2buildMutatorContext, m *Module) {
|
||||
sharedAttrs := bp2BuildParseSharedProps(ctx, m)
|
||||
staticAttrs := bp2BuildParseStaticProps(ctx, m)
|
||||
baseAttributes := bp2BuildParseBaseProps(ctx, m)
|
||||
@@ -480,7 +480,7 @@ func libraryBp2Build(ctx android.TopDownMutatorContext, m *Module) {
|
||||
createStubsBazelTargetIfNeeded(ctx, m, compilerAttrs, exportedIncludes, baseAttributes)
|
||||
}
|
||||
|
||||
func createStubsBazelTargetIfNeeded(ctx android.TopDownMutatorContext, m *Module, compilerAttrs compilerAttributes, exportedIncludes BazelIncludes, baseAttributes baseAttributes) {
|
||||
func createStubsBazelTargetIfNeeded(ctx android.Bp2buildMutatorContext, m *Module, compilerAttrs compilerAttributes, exportedIncludes BazelIncludes, baseAttributes baseAttributes) {
|
||||
if compilerAttrs.stubsSymbolFile != nil && len(compilerAttrs.stubsVersions.Value) > 0 {
|
||||
stubSuitesProps := bazel.BazelTargetModuleProperties{
|
||||
Rule_class: "cc_stub_suite",
|
||||
@@ -2886,7 +2886,7 @@ func maybeInjectBoringSSLHash(ctx android.ModuleContext, outputFile android.Modu
|
||||
return outputFile
|
||||
}
|
||||
|
||||
func bp2buildParseAbiCheckerProps(ctx android.TopDownMutatorContext, module *Module) bazelCcHeaderAbiCheckerAttributes {
|
||||
func bp2buildParseAbiCheckerProps(ctx android.Bp2buildMutatorContext, module *Module) bazelCcHeaderAbiCheckerAttributes {
|
||||
lib, ok := module.linker.(*libraryDecorator)
|
||||
if !ok {
|
||||
return bazelCcHeaderAbiCheckerAttributes{}
|
||||
@@ -2909,7 +2909,7 @@ func bp2buildParseAbiCheckerProps(ctx android.TopDownMutatorContext, module *Mod
|
||||
return abiCheckerAttrs
|
||||
}
|
||||
|
||||
func sharedOrStaticLibraryBp2Build(ctx android.TopDownMutatorContext, module *Module, isStatic bool) {
|
||||
func sharedOrStaticLibraryBp2Build(ctx android.Bp2buildMutatorContext, module *Module, isStatic bool) {
|
||||
baseAttributes := bp2BuildParseBaseProps(ctx, module)
|
||||
compilerAttrs := baseAttributes.compilerAttributes
|
||||
linkerAttrs := baseAttributes.linkerAttributes
|
||||
|
Reference in New Issue
Block a user