Add depfile handling for bazel_handler.

Test: go test soong tests
Test: TODO mixed build change header, mixed build
Change-Id: I7c51faf2d5b1a8717cbab6bb0b3eb75c307fcd85
This commit is contained in:
Liz Kammer
2021-03-25 16:42:37 -04:00
parent dca349a782
commit de116856fb
3 changed files with 123 additions and 4 deletions

View File

@@ -746,6 +746,10 @@ func (c *bazelSingleton) GenerateBuildActions(ctx SingletonContext) {
cmd.Implicit(PathForBazelOut(ctx, inputPath))
}
if depfile := buildStatement.Depfile; depfile != nil {
cmd.ImplicitDepFile(PathForBazelOut(ctx, *depfile))
}
// This is required to silence warnings pertaining to unexpected timestamps. Particularly,
// some Bazel builtins (such as files in the bazel_tools directory) have far-future
// timestamps. Without restat, Ninja would emit warnings that the input files of a