diff options
author | 2025-03-13 18:36:35 +0000 | |
---|---|---|
committer | 2025-03-13 18:36:35 +0000 | |
commit | f22120fb1da7f75a571966124bb0da6a57fd4f07 (patch) | |
tree | 9ffabf8102382f54c89595a59e3211eccd766217 /android/module.go | |
parent | 7c18e7f15b997e0e3199111446e0511ffd96b811 (diff) |
Change CommonModuleInfoProvider to a pointer.
Bug: 358427516
Test: Manually verified genereated ninja and mk files, unit tests.
Change-Id: I53a6dd718232735decbeb93febfd269dd9449e86
Diffstat (limited to 'android/module.go')
-rw-r--r-- | android/module.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/android/module.go b/android/module.go index c6c4fd838..0c967da7e 100644 --- a/android/module.go +++ b/android/module.go @@ -1488,7 +1488,7 @@ func (m *ModuleBase) computeInstallDeps(ctx ModuleContext) ([]depset.DepSet[Inst // Installation is still handled by Make, so anything hidden from Make is not // installable. info := OtherModuleProviderOrDefault(ctx, dep, InstallFilesProvider) - commonInfo := OtherModuleProviderOrDefault(ctx, dep, CommonModuleInfoProvider) + commonInfo := OtherModulePointerProviderOrDefault(ctx, dep, CommonModuleInfoProvider) if !commonInfo.HideFromMake && !commonInfo.SkipInstall { installDeps = append(installDeps, info.TransitiveInstallFiles) } @@ -1505,7 +1505,7 @@ func (m *ModuleBase) computeInstallDeps(ctx ModuleContext) ([]depset.DepSet[Inst // should also install the output files of the given dependency and dependency tag. func isInstallDepNeeded(ctx ModuleContext, dep ModuleProxy) bool { // Don't add a dependency from the platform to a library provided by an apex. - if OtherModuleProviderOrDefault(ctx, dep, CommonModuleInfoProvider).UninstallableApexPlatformVariant { + if OtherModulePointerProviderOrDefault(ctx, dep, CommonModuleInfoProvider).UninstallableApexPlatformVariant { return false } // Only install modules if the dependency tag is an InstallDepNeeded tag. @@ -1928,7 +1928,7 @@ type ApiLevelOrPlatform struct { IsPlatform bool } -var CommonModuleInfoProvider = blueprint.NewProvider[CommonModuleInfo]() +var CommonModuleInfoProvider = blueprint.NewProvider[*CommonModuleInfo]() type PrebuiltModuleInfo struct { SourceExists bool @@ -2336,7 +2336,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) if mm, ok := m.module.(interface{ BaseModuleName() string }); ok { commonData.BaseModuleName = mm.BaseModuleName() } - SetProvider(ctx, CommonModuleInfoProvider, commonData) + SetProvider(ctx, CommonModuleInfoProvider, &commonData) if p, ok := m.module.(PrebuiltInterface); ok && p.Prebuilt() != nil { SetProvider(ctx, PrebuiltModuleInfoProvider, PrebuiltModuleInfo{ SourceExists: p.Prebuilt().SourceExists(), |