Add --top_level_phony to catch more real-to-phony problems
As more phony rules move either to the packaging kati run, or soong, the
existing real-to-phony check failed to notice that they were phony
rules.
So I added --top_level_phony to Make that assumes that all leaf nodes
(source files, or nodes generated by another ninja file generator) that
do not have a '/' in them are phony targets.
The existing phony-looks-real check in Kati should prevent these from
being real generated files, and our source tree shouldn't have any
source files used at the root level.
Test: build_test on downstream branches
Change-Id: I77cff84b536c6cd6402307a9aa5a9c273e72c71f
diff --git a/ui/build/kati.go b/ui/build/kati.go
index 439c928..f924b9c 100644
--- a/ui/build/kati.go
+++ b/ui/build/kati.go
@@ -81,6 +81,7 @@
"--werror_suffix_rules",
"--warn_real_to_phony",
"--warn_phony_looks_real",
+ "--top_level_phony",
"--kati_stats",
}, args...)