diff options
author | 2023-08-11 16:15:12 -0400 | |
---|---|---|
committer | 2023-08-14 11:03:05 -0400 | |
commit | c86e094e131a0792215ddbf0256c16b3ab9e28e5 (patch) | |
tree | 34e44d42672c5fab32c65373a4811bce7a8f994a /android/override_module.go | |
parent | 4ed512b3c7c5ef53e4b82117d5021fc0ccb9b6d5 (diff) |
Make ShouldConvertWithBp2build avail in loadhooks
Test: Soong go tests
Change-Id: I65af040152107ce50b1a97efcee9364f28bad08b
Diffstat (limited to 'android/override_module.go')
-rw-r--r-- | android/override_module.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/android/override_module.go b/android/override_module.go index a4b7431f6..9e0de6fd0 100644 --- a/android/override_module.go +++ b/android/override_module.go @@ -353,26 +353,26 @@ func replaceDepsOnOverridingModuleMutator(ctx BottomUpMutatorContext) { // 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()) + return moduleNameWithPossibleOverride(ctx, ctx.Module(), ctx.OtherModuleName(ctx.Module())) } -func moduleNameWithPossibleOverride(ctx bazelOtherModuleContext, module blueprint.Module) string { +func moduleNameWithPossibleOverride(ctx shouldConvertModuleContext, module blueprint.Module, name string) string { if overridable, ok := module.(OverridableModule); ok { if o := overridable.GetOverriddenBy(); o != "" { return o } } - return ctx.OtherModuleName(module) + 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 bazelOtherModuleContext, module blueprint.Module) string { +func moduleDirWithPossibleOverride(ctx shouldConvertModuleContext, module blueprint.Module, dir string) string { if overridable, ok := module.(OverridableModule); ok { if o := overridable.GetOverriddenByModuleDir(); o != "" { return o } } - return ctx.OtherModuleDir(module) + return dir } |