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/object.go b/cc/object.go
index 72fd55b..57cc8b0 100644
--- a/cc/object.go
+++ b/cc/object.go
@@ -70,16 +70,16 @@
}
func (object *objectLinker) link(ctx ModuleContext,
- flags Flags, deps PathDeps, objFiles android.Paths) android.Path {
+ flags Flags, deps PathDeps, objs Objects) android.Path {
- objFiles = append(objFiles, deps.ObjFiles...)
+ objs = objs.Append(deps.Objs)
var outputFile android.Path
- if len(objFiles) == 1 {
- outputFile = objFiles[0]
+ if len(objs.objFiles) == 1 {
+ outputFile = objs.objFiles[0]
} else {
output := android.PathForModuleOut(ctx, ctx.ModuleName()+objectExtension)
- TransformObjsToObj(ctx, objFiles, flagsToBuilderFlags(flags), output)
+ TransformObjsToObj(ctx, objs.objFiles, flagsToBuilderFlags(flags), output)
outputFile = output
}