From 0a37d429bcbfdf5110bbfcf14f43764dc01585a4 Mon Sep 17 00:00:00 2001 From: Yu Liu Date: Thu, 13 Feb 2025 02:05:00 +0000 Subject: Change depVisitor to use providers instead of type-asserting to interfaces directly, the next step is to change it to use ModuleProxy once IsDepInSameApex is ready. Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I13a4e256a26dbf7f9b3b746d628ac8f68b4e598e --- filesystem/filesystem.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'filesystem/filesystem.go') diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index f84993de7..3829399b2 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -387,6 +387,9 @@ type InstalledFilesStruct struct { type FilesystemInfo struct { // The built filesystem image Output android.Path + // Returns the output file that is signed by avbtool. If this module is not signed, returns + // nil. + SignedOutputPath android.Path // An additional hermetic filesystem image. // e.g. this will contain inodes with pinned timestamps. // This will be copied to target_files.zip @@ -655,7 +658,8 @@ func (f *filesystem) GenerateAndroidBuildActions(ctx android.ModuleContext) { } fsInfo := FilesystemInfo{ - Output: f.output, + Output: f.OutputPath(), + SignedOutputPath: f.SignedOutputPath(), OutputHermetic: outputHermetic, FileListFile: fileListFile, RootDir: rootDir, @@ -1499,3 +1503,10 @@ func (f *filesystem) MakeVars(ctx android.MakeVarsModuleContext) { ctx.StrictRaw("SOONG_DEFINED_SYSTEM_IMAGE_PATH", f.output.String()) } } + +func setCommonFilesystemInfo(ctx android.ModuleContext, m Filesystem) { + android.SetProvider(ctx, FilesystemProvider, FilesystemInfo{ + Output: m.OutputPath(), + SignedOutputPath: m.SignedOutputPath(), + }) +} -- cgit v1.2.3-59-g8ed1b