summaryrefslogtreecommitdiff
path: root/android/override_module.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2023-12-07 16:54:51 -0800
committer Colin Cross <ccross@android.com> 2023-12-08 13:51:07 -0800
commitb63d7b3af71b13d94f30f1d973d375a5fadfdd48 (patch)
tree4119f7f781e93397a929304fc9f8193dfab24b14 /android/override_module.go
parent8ff105860d20f2ccbb8d8044bf562f94100b7f6a (diff)
Remove infrastructure to run bp2build
Bug: 315353489 Test: m blueprint_tests Change-Id: Idcf6377d389b94c39e4e6ff4b8efa8a9f9e78b17
Diffstat (limited to 'android/override_module.go')
-rw-r--r--android/override_module.go39
1 files changed, 0 insertions, 39 deletions
diff --git a/android/override_module.go b/android/override_module.go
index 9e0de6fd0..1341f537c 100644
--- a/android/override_module.go
+++ b/android/override_module.go
@@ -214,17 +214,6 @@ func (b *OverridableModuleBase) override(ctx BaseModuleContext, m Module, o Over
}
b.overridableModuleProperties.OverriddenBy = o.Name()
b.overridableModuleProperties.OverriddenByModuleDir = o.ModuleDir()
-
- if oBazelable, ok := o.base().module.(Bazelable); ok {
- if bBazelable, ok := m.(Bazelable); ok {
- oProps := oBazelable.bazelProps()
- bProps := bBazelable.bazelProps()
- bProps.Bazel_module.Bp2build_available = oProps.Bazel_module.Bp2build_available
- bProps.Bazel_module.Label = oProps.Bazel_module.Label
- } else {
- ctx.ModuleErrorf("Override type cannot be Bazelable if original module type is not Bazelable %v %v.", o.Name(), m.Name())
- }
- }
}
// GetOverriddenBy returns the name of the override module that has overridden this module.
@@ -348,31 +337,3 @@ func replaceDepsOnOverridingModuleMutator(ctx BottomUpMutatorContext) {
}
}
}
-
-// ModuleNameWithPossibleOverride returns the name of the OverrideModule that overrides the current
-// variant of this OverridableModule, or ctx.ModuleName() if this module is not an OverridableModule
-// or if this variant is not overridden.
-func ModuleNameWithPossibleOverride(ctx BazelConversionContext) string {
- return moduleNameWithPossibleOverride(ctx, ctx.Module(), ctx.OtherModuleName(ctx.Module()))
-}
-
-func moduleNameWithPossibleOverride(ctx shouldConvertModuleContext, module blueprint.Module, name string) string {
- if overridable, ok := module.(OverridableModule); ok {
- if o := overridable.GetOverriddenBy(); o != "" {
- return o
- }
- }
- return name
-}
-
-// moduleDirWithPossibleOverride returns the dir of the OverrideModule that overrides the current
-// variant of the given OverridableModule, or ctx.OtherModuleName() if the module is not an
-// OverridableModule or if the variant is not overridden.
-func moduleDirWithPossibleOverride(ctx shouldConvertModuleContext, module blueprint.Module, dir string) string {
- if overridable, ok := module.(OverridableModule); ok {
- if o := overridable.GetOverriddenByModuleDir(); o != "" {
- return o
- }
- }
- return dir
-}