diff options
author | Pirama Arumuga Nainar <pirama@google.com> | 2017-12-19 15:11:01 -0800 |
---|---|---|
committer | Pirama Arumuga Nainar <pirama@google.com> | 2017-12-19 15:44:38 -0800 |
commit | 70ba5a38d13516e39704adec2a4b1d4ba16421a9 (patch) | |
tree | f0375399d4c39079925544bb25d82eea8044dcff /cc/builder.go | |
parent | b267295324ecfb922016b697f361ece78172303a (diff) | |
download | build_soong-70ba5a38d13516e39704adec2a4b1d4ba16421a9.tar.gz build_soong-70ba5a38d13516e39704adec2a4b1d4ba16421a9.tar.bz2 build_soong-70ba5a38d13516e39704adec2a4b1d4ba16421a9.zip |
Add compile-time pathDeps as implicit dependencies
Bug: http://b/70820751
Bug: http://b/70857959
Clang does not output file dependencies from the -fprofile-use= flag
during -MD/-MM. Add this and other path dependencies as implicit Ninja
dependencies. Generated header dependencies are retained as OrderOnly
dependencies.
Test: Perturb profdata files for hwui/skia in internal branch and verify
that the sources get rebuilt.
Change-Id: I3247d995ee27a4882172eb15ff36acf56536b6f7
Diffstat (limited to 'cc/builder.go')
-rw-r--r-- | cc/builder.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cc/builder.go b/cc/builder.go index e583834e..de85d6e7 100644 --- a/cc/builder.go +++ b/cc/builder.go @@ -290,7 +290,7 @@ func (a Objects) Append(b Objects) Objects { // Generate rules for compiling multiple .c, .cpp, or .S files to individual .o files func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles android.Paths, - flags builderFlags, deps android.Paths) Objects { + flags builderFlags, pathDeps android.Paths, genDeps android.Paths) Objects { objFiles := make(android.Paths, len(srcFiles)) var tidyFiles android.Paths @@ -363,7 +363,8 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and Description: "yasm " + srcFile.Rel(), Output: objFile, Input: srcFile, - OrderOnly: deps, + Implicits: pathDeps, + OrderOnly: genDeps, Args: map[string]string{ "asFlags": flags.yasmFlags, }, @@ -375,7 +376,8 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and Description: "windres " + srcFile.Rel(), Output: objFile, Input: srcFile, - OrderOnly: deps, + Implicits: pathDeps, + OrderOnly: genDeps, Args: map[string]string{ "windresCmd": gccCmd(flags.toolchain, "windres"), "flags": flags.toolchain.WindresFlags(), @@ -443,7 +445,8 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and Output: objFile, ImplicitOutputs: implicitOutputs, Input: srcFile, - OrderOnly: deps, + Implicits: pathDeps, + OrderOnly: genDeps, Args: map[string]string{ "cFlags": moduleCflags, "ccCmd": ccCmd, |