diff options
author | 2025-02-24 16:18:18 -0800 | |
---|---|---|
committer | 2025-02-24 19:04:46 -0800 | |
commit | d143f3e35485b8ad9f5be0bede0f030874025240 (patch) | |
tree | 4beb9463f2f21737bf1d99aa4e550bd9dd26c92a /sdk/sdk.go | |
parent | 324d19b8b5a20678586d4e8e4b894a2bba70a2ae (diff) |
Remove DistFiles from AndroidMk datastructures
The code that collects dists also supports getting them from
OutputFiles. Switch the few remaining usages of AndroidMk-based
disted files over to OutputFiles, and remove DistFiles from the
AndroidMk datastructures.
This should allow us to clean up more AndroidMk code in a followup
cl.
Bug: 398938465
Test: Confirmed that the ninja files for "m nothing dist" don't change after this cl.
Change-Id: I9eaed21018ef73ec36276556e7daa7201b272009
Diffstat (limited to 'sdk/sdk.go')
-rw-r--r-- | sdk/sdk.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sdk/sdk.go b/sdk/sdk.go index aa82abbb4..ab50659cd 100644 --- a/sdk/sdk.go +++ b/sdk/sdk.go @@ -178,22 +178,24 @@ func (s *sdk) GenerateAndroidBuildActions(ctx android.ModuleContext) { s.buildSnapshot(ctx, sdkVariants) } + if s.snapshotFile.Valid() != s.infoFile.Valid() { + panic(fmt.Sprintf("Snapshot (%q) and info file (%q) should both be set or neither should be set.", s.snapshotFile, s.infoFile)) + } + if s.snapshotFile.Valid() { ctx.SetOutputFiles([]android.Path{s.snapshotFile.Path()}, "") + ctx.SetOutputFiles([]android.Path{s.snapshotFile.Path(), s.infoFile.Path()}, android.DefaultDistTag) } } func (s *sdk) AndroidMkEntries() []android.AndroidMkEntries { - if !s.snapshotFile.Valid() != !s.infoFile.Valid() { - panic("Snapshot (%q) and info file (%q) should both be set or neither should be set.") - } else if !s.snapshotFile.Valid() { + if !s.snapshotFile.Valid() { return []android.AndroidMkEntries{} } return []android.AndroidMkEntries{android.AndroidMkEntries{ Class: "FAKE", OutputFile: s.snapshotFile, - DistFiles: android.MakeDefaultDistFiles(s.snapshotFile.Path(), s.infoFile.Path()), Include: "$(BUILD_PHONY_PACKAGE)", ExtraEntries: []android.AndroidMkExtraEntriesFunc{ func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) { |