Delete ApiBp2build soong_build mode

This feature is obsolete.

This makes a large number of codepaths "dead code" (such as
module-specific implementations of ApiBp2build functionality). These
will be deleted in a followup CL.

Bug: 284029211
Test: Presubmits
Change-Id: Ib53b99f1fe8c24380d219caf44e9bb3b96724fa0
This commit is contained in:
Chris Parsons
2023-06-20 21:46:57 +00:00
committed by Cole Faust
parent 079efbda94
commit 73f411b72c
16 changed files with 8 additions and 642 deletions

View File

@@ -510,12 +510,6 @@ func (b *BazelModuleBase) shouldConvertWithBp2build(ctx shouldConvertModuleConte
}
module := p.module
// In api_bp2build mode, all soong modules that can provide API contributions should be converted
// This is irrespective of its presence/absence in bp2build allowlists
if ctx.Config().BuildMode == ApiBp2build {
_, providesApis := module.(ApiProvider)
return providesApis
}
propValue := b.bazelProperties.Bazel_module.Bp2build_available
packagePath := moduleDirWithPossibleOverride(ctx, module, p.moduleDir)

View File

@@ -87,7 +87,6 @@ type CmdArgs struct {
SymlinkForestMarker string
Bp2buildMarker string
BazelQueryViewDir string
BazelApiBp2buildDir string
ModuleGraphFile string
ModuleActionsFile string
DocFile string
@@ -121,9 +120,6 @@ const (
// express build semantics.
GenerateQueryView
// Generate BUILD files for API contributions to API surfaces
ApiBp2build
// Create a JSON representation of the module graph and exit.
GenerateModuleGraph
@@ -641,7 +637,6 @@ func NewConfig(cmdArgs CmdArgs, availableEnv map[string]string) (Config, error)
setBuildMode(cmdArgs.SymlinkForestMarker, SymlinkForest)
setBuildMode(cmdArgs.Bp2buildMarker, Bp2build)
setBuildMode(cmdArgs.BazelQueryViewDir, GenerateQueryView)
setBuildMode(cmdArgs.BazelApiBp2buildDir, ApiBp2build)
setBuildMode(cmdArgs.ModuleGraphFile, GenerateModuleGraph)
setBuildMode(cmdArgs.DocFile, GenerateDocFile)
setBazelMode(cmdArgs.BazelMode, "--bazel-mode", BazelProdMode)

View File

@@ -197,13 +197,6 @@ func (ctx *Context) RegisterForBazelConversion() {
RegisterMutatorsForBazelConversion(ctx, bp2buildPreArchMutators)
}
// RegisterForApiBazelConversion is similar to RegisterForBazelConversion except that
// it only generates API targets in the generated workspace
func (ctx *Context) RegisterForApiBazelConversion() {
registerModuleTypes(ctx)
RegisterMutatorsForApiBazelConversion(ctx, bp2buildPreArchMutators)
}
// Register the pipeline of singletons, module types, and mutators for
// generating build.ninja and other files for Kati, from Android.bp files.
func (ctx *Context) Register() {

View File

@@ -467,12 +467,6 @@ func (ctx *TestContext) RegisterForBazelConversion() {
RegisterMutatorsForBazelConversion(ctx.Context, ctx.bp2buildPreArch)
}
// RegisterForApiBazelConversion prepares a test context for API bp2build conversion.
func (ctx *TestContext) RegisterForApiBazelConversion() {
ctx.config.BuildMode = ApiBp2build
RegisterMutatorsForApiBazelConversion(ctx.Context, ctx.bp2buildPreArch)
}
func (ctx *TestContext) ParseFileList(rootDir string, filePaths []string) (deps []string, errs []error) {
// This function adapts the old style ParseFileList calls that are spread throughout the tests
// to the new style that takes a config.