From 605b5da192dc025802d0a1f833586674dd420255 Mon Sep 17 00:00:00 2001 From: Justin Yun Date: Tue, 4 Jun 2024 10:35:19 +0900 Subject: [PATCH] Regard out/soong/release-config as a source directory Files in out/soong/release-config are generated from lunch or kati configuration phase. They don't have rules in ninja, but always provided as source files. Bug: 324996303 Test: m checkbuild Change-Id: Ibfb76a8c58a81a4d768b29d80151fa47e2ebb9c1 --- ui/build/test_build.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/build/test_build.go b/ui/build/test_build.go index 309513919..24ad08284 100644 --- a/ui/build/test_build.go +++ b/ui/build/test_build.go @@ -79,6 +79,10 @@ func testForDanglingRules(ctx Context, config Config) { // bpglob is built explicitly using Microfactory bpglob := filepath.Join(config.SoongOutDir(), "bpglob") + // release-config files are generated from the initial lunch or Kati phase + // before running soong and ninja. + releaseConfigDir := filepath.Join(outDir, "soong", "release-config") + danglingRules := make(map[string]bool) scanner := bufio.NewScanner(stdout) @@ -93,7 +97,8 @@ func testForDanglingRules(ctx Context, config Config) { line == variablesFilePath || line == dexpreoptConfigFilePath || line == buildDatetimeFilePath || - line == bpglob { + line == bpglob || + strings.HasPrefix(line, releaseConfigDir) { // Leaf node is in one of Soong's bootstrap directories, which do not have // full build rules in the primary build.ninja file. continue