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

Commit fa6995f7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Remove infrastructure to run bp2build" into main

parents c1fb1592 b63d7b3a
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -12,14 +12,11 @@ bootstrap_go_package {
        "sbox_proto",
        "soong",
        "soong-android-soongconfig",
        "soong-bazel",
        "soong-cquery",
        "soong-remoteexec",
        "soong-response",
        "soong-shared",
        "soong-starlark",
        "soong-starlark-format",
        "soong-ui-bp2build_metrics_proto",
        "soong-ui-metrics_proto",
        "soong-android-allowlists",

@@ -38,9 +35,6 @@ bootstrap_go_package {
        "arch.go",
        "arch_list.go",
        "base_module_context.go",
        "bazel.go",
        "bazel_handler.go",
        "bazel_paths.go",
        "buildinfo_prop.go",
        "config.go",
        "test_config.go",
@@ -106,9 +100,6 @@ bootstrap_go_package {
        "androidmk_test.go",
        "apex_test.go",
        "arch_test.go",
        "bazel_handler_test.go",
        "bazel_paths_test.go",
        "bazel_test.go",
        "config_test.go",
        "config_bp2build_test.go",
        "configured_jars_test.go",
+0 −3
Original line number Diff line number Diff line
@@ -111,9 +111,6 @@ func (a *allApexContributions) SetPrebuiltSelectionInfoProvider(ctx BaseModuleCo
		}
	}

	if ctx.Config().Bp2buildMode() { // Skip bp2build
		return
	}
	p := PrebuiltSelectionInfoMap{}
	ctx.VisitDirectDepsWithTag(acDepTag, func(child Module) {
		if m, ok := child.(*apexContributions); ok {
+2 −2
Original line number Diff line number Diff line
@@ -425,7 +425,7 @@ func osMutator(bpctx blueprint.BottomUpMutatorContext) {
	// blueprint.BottomUpMutatorContext because android.BottomUpMutatorContext
	// filters out non-Soong modules.  Now that we've handled them, create a
	// normal android.BottomUpMutatorContext.
	mctx := bottomUpMutatorContextFactory(bpctx, module, false, false)
	mctx := bottomUpMutatorContextFactory(bpctx, module, false)

	base := module.base()

@@ -570,7 +570,7 @@ func archMutator(bpctx blueprint.BottomUpMutatorContext) {
	// blueprint.BottomUpMutatorContext because android.BottomUpMutatorContext
	// filters out non-Soong modules.  Now that we've handled them, create a
	// normal android.BottomUpMutatorContext.
	mctx := bottomUpMutatorContextFactory(bpctx, module, false, false)
	mctx := bottomUpMutatorContextFactory(bpctx, module, false)

	base := module.base()

+0 −45
Original line number Diff line number Diff line
@@ -112,8 +112,6 @@ type BaseModuleContext interface {
	// the first DependencyTag.
	GetDirectDep(name string) (blueprint.Module, blueprint.DependencyTag)

	ModuleFromName(name string) (blueprint.Module, bool)

	// VisitDirectDepsBlueprint calls visit for each direct dependency.  If there are multiple
	// direct dependencies on the same module visit will be called multiple times on that module
	// and OtherModuleDependencyTag will return a different tag for each.
@@ -209,12 +207,6 @@ type BaseModuleContext interface {
	// Calling this function prevents adding new dependencies.
	getMissingDependencies() []string

	// AddUnconvertedBp2buildDep stores module name of a direct dependency that was not converted via bp2build
	AddUnconvertedBp2buildDep(dep string)

	// AddMissingBp2buildDep stores the module name of a direct dependency that was not found.
	AddMissingBp2buildDep(dep string)

	Target() Target
	TargetPrimary() bool

@@ -243,12 +235,8 @@ type baseModuleContext struct {

	strictVisitDeps bool // If true, enforce that all dependencies are enabled

	bazelConversionMode bool
}

func (b *baseModuleContext) isBazelConversionMode() bool {
	return b.bazelConversionMode
}
func (b *baseModuleContext) OtherModuleName(m blueprint.Module) string {
	return b.bp.OtherModuleName(m)
}
@@ -296,18 +284,6 @@ func (b *baseModuleContext) blueprintBaseModuleContext() blueprint.BaseModuleCon
	return b.bp
}

// AddUnconvertedBp2buildDep stores module name of a dependency that was not converted to Bazel.
func (b *baseModuleContext) AddUnconvertedBp2buildDep(dep string) {
	unconvertedDeps := &b.Module().base().commonProperties.BazelConversionStatus.UnconvertedDeps
	*unconvertedDeps = append(*unconvertedDeps, dep)
}

// AddMissingBp2buildDep stores module name of a dependency that was not found in a Android.bp file.
func (b *baseModuleContext) AddMissingBp2buildDep(dep string) {
	missingDeps := &b.Module().base().commonProperties.BazelConversionStatus.MissingDeps
	*missingDeps = append(*missingDeps, dep)
}

func (b *baseModuleContext) AddMissingDependencies(deps []string) {
	if deps != nil {
		missingDeps := &b.Module().base().commonProperties.MissingDeps
@@ -435,27 +411,6 @@ func (b *baseModuleContext) GetDirectDep(name string) (blueprint.Module, bluepri
	return b.getDirectDepFirstTag(name)
}

func (b *baseModuleContext) ModuleFromName(name string) (blueprint.Module, bool) {
	if !b.isBazelConversionMode() {
		panic("cannot call ModuleFromName if not in bazel conversion mode")
	}
	var m blueprint.Module
	var ok bool
	if moduleName, _ := SrcIsModuleWithTag(name); moduleName != "" {
		m, ok = b.bp.ModuleFromName(moduleName)
	} else {
		m, ok = b.bp.ModuleFromName(name)
	}
	if !ok {
		return m, ok
	}
	// If this module is not preferred, tried to get the prebuilt version instead
	if a, aOk := m.(Module); aOk && !IsModulePrebuilt(a) && !IsModulePreferred(a) {
		return b.ModuleFromName("prebuilt_" + name)
	}
	return m, ok
}

func (b *baseModuleContext) VisitDirectDepsBlueprint(visit func(blueprint.Module)) {
	b.bp.VisitDirectDeps(visit)
}

android/bazel.go

deleted100644 → 0
+0 −784

File deleted.

Preview size limit exceeded, changes collapsed.

Loading