Add a soong-only mode to soong-ui

The previous --skip-kati flag could be interpreted as "do not run kati
to re-generate ninja file". Add a more specific flag for the "soong
only" build use-case, where we do not load the kati-generated ninja
files at all.

Bug: 189187214
Test: build/soong/soong_ui.bash \
  --make-mode \
  --soong-only
  --skip-soong-tests \
  TARGET_PRODUCT=mainline_sdk \
  SOONG_ALLOW_MISSING_DEPENDENCIES=true \
  SOONG_SDK_SNAPSHOT_VERSION=unversioned \
  SOONG_SDK_SNAPSHOT_USE_SRCJAR=true \
  out/soong/mainline-sdks/art-module-sdk.zip
Change-Id: I91abbd28af517d4b550ebc6d88fd64947caf9545
Merged-In: I91abbd28af517d4b550ebc6d88fd64947caf9545
(cherry picked from commit 546de4a1f3de92a2f920daa6311a1c317aedf877)
diff --git a/ui/build/config.go b/ui/build/config.go
index 3a445a3..220e734 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -48,6 +48,7 @@
 	dist           bool
 	skipConfig     bool
 	skipKati       bool
+	skipKatiNinja  bool
 	skipNinja      bool
 	skipSoongTests bool
 
@@ -575,7 +576,11 @@
 			c.skipConfig = true
 			c.skipKati = true
 		} else if arg == "--skip-kati" {
+			// TODO: remove --skip-kati once module builds have been migrated to --song-only
 			c.skipKati = true
+		} else if arg == "--soong-only" {
+			c.skipKati = true
+			c.skipKatiNinja = true
 		} else if arg == "--skip-soong-tests" {
 			c.skipSoongTests = true
 		} else if len(arg) > 0 && arg[0] == '-' {
@@ -791,6 +796,10 @@
 	return c.skipKati
 }
 
+func (c *configImpl) SkipKatiNinja() bool {
+	return c.skipKatiNinja
+}
+
 func (c *configImpl) SkipNinja() bool {
 	return c.skipNinja
 }