diff options
author | 2025-03-04 18:46:24 +0000 | |
---|---|---|
committer | 2025-03-07 22:27:00 +0000 | |
commit | 8840812f9dfa3ba5ceecd75e582836a3c673d54b (patch) | |
tree | fff1295a2cc6222dd8ddafac052d82da645fbebe /rust | |
parent | 4a053d74d73a4826530d1b06be8aa5ad55212ff2 (diff) |
Convert singletonModuleSingletonAdaptor, rustdocSingleton,
sizesSingleton, movedToApexLlndkLibraries and
allBuildFlagDeclarationsSingleton to use ModuleProxy.
Bug: 377723687
Test: Unit tests and compare the ninja json and mk files generated.
Change-Id: I90ea5599a55975b27e9ce6e91b20104849f5887f
Diffstat (limited to 'rust')
-rw-r--r-- | rust/doc.go | 10 | ||||
-rw-r--r-- | rust/rust.go | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/rust/doc.go b/rust/doc.go index fe205233d..2fb6ba98e 100644 --- a/rust/doc.go +++ b/rust/doc.go @@ -37,14 +37,14 @@ func (n *rustdocSingleton) GenerateBuildActions(ctx android.SingletonContext) { FlagWithArg("-C ", docDir.String()). FlagWithArg("-D ", docDir.String()) - ctx.VisitAllModules(func(module android.Module) { - if !module.Enabled(ctx) { + ctx.VisitAllModuleProxies(func(module android.ModuleProxy) { + if !android.OtherModuleProviderOrDefault(ctx, module, android.CommonModuleInfoKey).Enabled { return } - if m, ok := module.(*Module); ok { - if m.docTimestampFile.Valid() { - zipCmd.Implicit(m.docTimestampFile.Path()) + if m, ok := android.OtherModuleProvider(ctx, module, RustInfoProvider); ok { + if m.DocTimestampFile.Valid() { + zipCmd.Implicit(m.DocTimestampFile.Path()) } } }) diff --git a/rust/rust.go b/rust/rust.go index d8a044423..2e3d846dd 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -61,6 +61,7 @@ type RustInfo struct { SnapshotInfo *cc.SnapshotInfo SourceProviderInfo *SourceProviderInfo XrefRustFiles android.Paths + DocTimestampFile android.OptionalPath } var RustInfoProvider = blueprint.NewProvider[*RustInfo]() @@ -1173,6 +1174,7 @@ func (mod *Module) GenerateAndroidBuildActions(actx android.ModuleContext) { RustSubName: mod.Properties.RustSubName, TransitiveAndroidMkSharedLibs: mod.transitiveAndroidMkSharedLibs, XrefRustFiles: mod.XrefRustFiles(), + DocTimestampFile: mod.docTimestampFile, } if mod.compiler != nil { rustInfo.CompilerInfo = &CompilerInfo{ |