Start using "struct Objects" to store object Paths
So that we can represent other files that get generated along with the
objects, like the gcno coverage information, and per-file clang-tidy
runs.
Test: Soong's build.ninja identical before/after
Change-Id: I5c553a153c436d5403549f62c73fe79c5f101779
diff --git a/cc/compiler.go b/cc/compiler.go
index 0184ee9..454be5e 100644
--- a/cc/compiler.go
+++ b/cc/compiler.go
@@ -350,7 +350,7 @@
return nil
}
-func (compiler *baseCompiler) compile(ctx ModuleContext, flags Flags, deps PathDeps) android.Paths {
+func (compiler *baseCompiler) compile(ctx ModuleContext, flags Flags, deps PathDeps) Objects {
pathDeps := deps.GeneratedHeaders
pathDeps = append(pathDeps, ndkPathDeps(ctx)...)
@@ -367,18 +367,18 @@
compiler.deps = pathDeps
// Compile files listed in c.Properties.Srcs into objects
- objFiles := compileObjs(ctx, buildFlags, "", srcs, compiler.deps)
+ objs := compileObjs(ctx, buildFlags, "", srcs, compiler.deps)
if ctx.Failed() {
- return nil
+ return Objects{}
}
- return objFiles
+ return objs
}
// Compile a list of source files into objects a specified subdirectory
func compileObjs(ctx android.ModuleContext, flags builderFlags,
- subdir string, srcFiles, deps android.Paths) android.Paths {
+ subdir string, srcFiles, deps android.Paths) Objects {
return TransformSourceToObj(ctx, subdir, srcFiles, flags, deps)
}