From d81496084b4b9c2b183f9551733a745dc7ec567f Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 12 May 2015 17:14:57 -0700 Subject: [PATCH] Fix repeated ccCmd dependencies on object files ccCmd was being added as a dependency each time through the object file loop, tripling the size of the build.ninja file. Create a new slice for dependencies on each object file. Change-Id: Id768d8ea6e5300c15f0f1a5fac5fcbdfdf5e6b0a --- cc/builder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cc/builder.go b/cc/builder.go index 218c73b24..ab0e40c5c 100644 --- a/cc/builder.go +++ b/cc/builder.go @@ -188,13 +188,13 @@ func TransformSourceToObj(ctx common.AndroidModuleContext, subdir string, srcFil ccCmd = gccCmd(flags.toolchain, ccCmd) } - deps = append([]string{ccCmd}, deps...) + objDeps := append([]string{ccCmd}, deps...) ctx.Build(pctx, blueprint.BuildParams{ Rule: cc, Outputs: []string{objFile}, Inputs: []string{srcFile}, - Implicits: deps, + Implicits: objDeps, Args: map[string]string{ "cFlags": moduleCflags, "ccCmd": ccCmd,