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
diff --git a/cc/cc.go b/cc/cc.go
index 0e70d48..4b314cd 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -754,6 +754,10 @@
// Get the deps that have been explicitly specified in the properties.
linkerSpecifiedDeps(ctx android.ConfigurableEvaluatorContext, module *Module, specifiedDeps specifiedDeps) specifiedDeps
+ // Gets a list of files that will be disted when using the dist property without specifying
+ // an output file tag.
+ defaultDistFiles() []android.Path
+
moduleInfoJSON(ctx ModuleContext, moduleInfoJSON *android.ModuleInfoJSON)
}
@@ -2423,6 +2427,10 @@
if c.linker != nil {
ctx.SetOutputFiles(android.PathsIfNonNil(c.linker.unstrippedOutputFilePath()), "unstripped")
ctx.SetOutputFiles(android.PathsIfNonNil(c.linker.strippedAllOutputFilePath()), "stripped_all")
+ defaultDistFiles := c.linker.defaultDistFiles()
+ if len(defaultDistFiles) > 0 {
+ ctx.SetOutputFiles(defaultDistFiles, android.DefaultDistTag)
+ }
}
}