mixed build targets need transitive tidy files

Previously in mixed builds, only the tidy files for the boundary module
were built, whereas all of its transitive dependencies' tidy files were
not being built. Instead we should export the list of transitive tidy
files for a module so that we can run clang-tidy for the boundary module
as well as its dependencies.

Bug: 195029134
Test: WITH_TIDY=1 DISABLE_ARTIFACT_PATH_REQUIREMENTS=true mss tidy-packages-modules-NeuralNetworks --bazel-mode-dev
Change-Id: I463646d2ae1fc4aa075a54c264e1c34571c3fd5c
This commit is contained in:
Sam Delmerico
2023-02-03 18:12:15 -05:00
parent cb3c52c766
commit 4ed95e263f
13 changed files with 318 additions and 24 deletions

View File

@@ -588,7 +588,11 @@ func (handler *ccBinaryBazelHandler) ProcessBazelQueryResponse(ctx android.Modul
return
}
outputFilePath := android.PathForBazelOut(ctx, info.OutputFile)
var outputFilePath android.Path = android.PathForBazelOut(ctx, info.OutputFile)
if len(info.TidyFiles) > 0 {
handler.module.tidyFiles = android.PathsForBazelOut(ctx, info.TidyFiles)
outputFilePath = android.AttachValidationActions(ctx, outputFilePath, handler.module.tidyFiles)
}
handler.module.outputFile = android.OptionalPathForPath(outputFilePath)
handler.module.linker.(*binaryDecorator).unstrippedOutputFile = android.PathForBazelOut(ctx, info.UnstrippedOutput)