diff options
author | 2025-02-26 20:13:04 +0000 | |
---|---|---|
committer | 2025-02-26 20:13:04 +0000 | |
commit | e472c1dce304ca1e156e3270d104c552cc46ca2a (patch) | |
tree | fd441c471f4885370cbc3c7a705664dc59984159 /android/module.go | |
parent | 119d38cb12b965ca54c9a761dd71466e9f8f78e2 (diff) |
Make EqualModules a free function.
Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: I7e00f09a15f2857f58bea70bcedc4798630a40bc
Diffstat (limited to 'android/module.go')
-rw-r--r-- | android/module.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/android/module.go b/android/module.go index d19648124..85909b602 100644 --- a/android/module.go +++ b/android/module.go @@ -1665,7 +1665,7 @@ func (m *ModuleBase) generateModuleTarget(ctx *moduleContext) { var checkbuildTarget Path var uncheckedModule bool var skipAndroidMkProcessing bool - if ctx.EqualModules(m.module, module) { + if EqualModules(m.module, module) { allInstalledFiles = append(allInstalledFiles, ctx.installFiles...) checkbuildTarget = ctx.checkbuildTarget uncheckedModule = ctx.uncheckedModule @@ -2931,7 +2931,6 @@ type OutputFilesProviderModuleContext interface { OtherModuleProviderContext Module() Module GetOutputFiles() OutputFilesInfo - EqualModules(m1, m2 Module) bool } // TODO(b/397766191): Change the signature to take ModuleProxy @@ -2943,7 +2942,7 @@ func outputFilesForModule(ctx PathContext, module Module, tag string) (Paths, er } if octx, ok := ctx.(OutputFilesProviderModuleContext); ok { - if octx.EqualModules(octx.Module(), module) { + if EqualModules(octx.Module(), module) { // It is the current module, we can access the srcs through interface if sourceFileProducer, ok := module.(SourceFileProducer); ok { return sourceFileProducer.Srcs(), nil @@ -2971,7 +2970,7 @@ func outputFilesForModuleFromProvider(ctx PathContext, module Module, tag string fromProperty := false if mctx, isMctx := ctx.(OutputFilesProviderModuleContext); isMctx { - if !mctx.EqualModules(mctx.Module(), module) { + if !EqualModules(mctx.Module(), module) { outputFiles, _ = OtherModuleProvider(mctx, module, OutputFilesProvider) } else { outputFiles = mctx.GetOutputFiles() |