Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73f411b7 authored by Chris Parsons's avatar Chris Parsons Committed by Cole Faust
Browse files

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
parent 079efbda
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -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)
+0 −5
Original line number Diff line number Diff line
@@ -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)
+0 −7
Original line number Diff line number Diff line
@@ -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() {
+0 −6
Original line number Diff line number Diff line
@@ -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.
+0 −1
Original line number Diff line number Diff line
@@ -61,7 +61,6 @@ bootstrap_go_package {
        "cc_test_conversion_test.go",
        "cc_yasm_conversion_test.go",
        "conversion_test.go",
        "droidstubs_conversion_test.go",
        "filegroup_conversion_test.go",
        "genrule_conversion_test.go",
        "gensrcs_conversion_test.go",
Loading