From f95cfa60875bfac7d8dd7b53a9050b93d8b0d899 Mon Sep 17 00:00:00 2001 From: mrziwang Date: Tue, 18 Jun 2024 10:11:39 -0700 Subject: [PATCH] Use OutputFilesProvider on cc_cmake_snapshot In the context of incremental soong, the output files inter-module-communication will be through OutputFilesProvider. The OutputFileProducer interface will be deprecated. Test: CI Bug: 339477385 Change-Id: I38d9b2a953296134490a4347ecd024dac2dd4757 --- cc/cmake_snapshot.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/cc/cmake_snapshot.go b/cc/cmake_snapshot.go index b4d1268b6..b01636965 100644 --- a/cc/cmake_snapshot.go +++ b/cc/cmake_snapshot.go @@ -15,7 +15,6 @@ package cc import ( - "android/soong/android" "bytes" _ "embed" "fmt" @@ -25,6 +24,8 @@ import ( "strings" "text/template" + "android/soong/android" + "github.com/google/blueprint" "github.com/google/blueprint/proptools" ) @@ -462,15 +463,8 @@ func (m *CmakeSnapshot) GenerateAndroidBuildActions(ctx android.ModuleContext) { // Finish generating the final zip file zipRule.Build(m.zipPath.String(), "archiving "+ctx.ModuleName()) -} -func (m *CmakeSnapshot) OutputFiles(tag string) (android.Paths, error) { - switch tag { - case "": - return android.Paths{m.zipPath}, nil - default: - return nil, fmt.Errorf("unsupported module reference tag %q", tag) - } + ctx.SetOutputFiles(android.Paths{m.zipPath}, "") } func (m *CmakeSnapshot) AndroidMkEntries() []android.AndroidMkEntries {