Check for frameworks/base/Android.bp instead of frameworks/base

Calling ExistentPathForSource from a PackageVarContext has to fall
back to a less optimal glob dependency implementation that adds the
file to out/soong/build.ninja.d.  Checking for "frameworks/base"
adds the directory to build.ninja.d, resulting in any writes to that
directory potentially causing a regeneration.  Check for
"frameworks/base/Android.bp", which will already cause a regeneration
if its timestamp changes and therefore not increase regenerations.

Bug: 158342713
Test: m nothing && touch frameworks/base/foo && m nothing
Change-Id: Iac7ac0445dbaa365c90e9a012f1f32020afc6c08
This commit is contained in:
Colin Cross
2021-03-16 16:34:46 -07:00
parent eb32d6c2a6
commit 5a756a63e4

View File

@@ -1005,7 +1005,7 @@ func (c *config) DexpreoptGlobalConfig(ctx PathContext) ([]byte, error) {
}
func (c *config) FrameworksBaseDirExists(ctx PathContext) bool {
return ExistentPathForSource(ctx, "frameworks", "base").Valid()
return ExistentPathForSource(ctx, "frameworks", "base", "Android.bp").Valid()
}
func (c *config) VndkSnapshotBuildArtifacts() bool {