Add depfile support to RuleBuilder

Allow rules built with RuleBuilder to use depfiles.  Ninja only
supports a single depfile with single output.  If there are
multiple outputs in a rule, move all but the first to implicit
outputs.  If multiple depfiles are specified, use new support
in dep_fixer to combine additional depfiles into the first depfile.

Test: rule_builder_test.go
Change-Id: I7dd4ba7fdf9feaf89b3dd2b7abb0e79006e06018
This commit is contained in:
Colin Cross
2019-03-29 15:33:06 -07:00
parent 92b7d584c8
commit 1d2cf0494a
5 changed files with 171 additions and 43 deletions

View File

@@ -103,7 +103,7 @@ func TestDexpreoptBootJars(t *testing.T) {
expectedOutputs[i] = filepath.Join(buildDir, "test_device", expectedOutputs[i])
}
outputs := bootArt.Outputs.Strings()
outputs := append(android.WritablePaths{bootArt.Output}, bootArt.ImplicitOutputs...).Strings()
sort.Strings(outputs)
sort.Strings(expectedOutputs)