Skip writing ninja file for module with a cache hit during incremental build.

This is just the first change, many more will come to make this feature
really work. The main changes included here are:

1. Skip the writing of ninja file if a module has a cache hit.
2. Handle the case where a skipped module doesn't have the build defs
   info for the OrderOnlyStrings dedup logic to work by caching the
   missing info.

Bug: 335718784
Test: local manual tests
Change-Id: I32542bd1e7fd268113e072e7f68b51b293d83d03
This commit is contained in:
Yu Liu
2024-07-30 17:30:45 +00:00
parent 2800675b31
commit f072120c00
3 changed files with 7 additions and 12 deletions

View File

@@ -1921,7 +1921,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
restored := false
if incrementalAnalysis && cacheKey != nil {
restored = ctx.bp.RestoreBuildActions(cacheKey, incrementalModule)
restored = ctx.bp.RestoreBuildActions(cacheKey)
}
if !restored {