Actually depend on the headers from renderscript
Instead of having all the object compilations depend on a stamp file,
instead depend on the headers, which are already available in the build
graph.
This allows my RBE builds to just find the headers, instead of having to
walk the graph to find the other outputs.
Test: treehugger
Test: build a system image with RBE
Change-Id: I0a310229be26d7bd399e074a4350d5be038f8661
diff --git a/cc/rs.go b/cc/rs.go
index 5421b92..fbc6bfb 100644
--- a/cc/rs.go
+++ b/cc/rs.go
@@ -72,11 +72,12 @@
stampFile := android.PathForModuleGen(ctx, "rs", "rs.stamp")
depFiles := make(android.WritablePaths, 0, len(rsFiles))
genFiles := make(android.WritablePaths, 0, 2*len(rsFiles))
+ headers := make(android.Paths, 0, len(rsFiles))
for _, rsFile := range rsFiles {
depFiles = append(depFiles, rsGeneratedDepFile(ctx, rsFile))
- genFiles = append(genFiles,
- rsGeneratedCppFile(ctx, rsFile),
- rsGeneratedHFile(ctx, rsFile))
+ headerFile := rsGeneratedHFile(ctx, rsFile)
+ genFiles = append(genFiles, rsGeneratedCppFile(ctx, rsFile), headerFile)
+ headers = append(headers, headerFile)
}
ctx.Build(pctx, android.BuildParams{
@@ -92,7 +93,7 @@
},
})
- return android.Paths{stampFile}
+ return headers
}
func rsFlags(ctx ModuleContext, flags Flags, properties *BaseCompilerProperties) Flags {