Add support for skipping just kati
The existing --skip-make flag disables both the config step and the kati
step in the build. Add support for a --skip-kati flag that skips just
the kati step, and refactor things so that the logic is shared between
these two.
Bug: 174315599
Test: TARGET_PRODUCT=aosp_arm64 soong_ui --make-mode --skip-kati;
(verify soong.variables is regenerated)
Change-Id: I75b1910fc1c12fcda130e37b7bc4c050131c7b33
diff --git a/ui/build/config.go b/ui/build/config.go
index 229bd5c..c9911f3 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -46,7 +46,8 @@
verbose bool
checkbuild bool
dist bool
- skipMake bool
+ skipConfig bool
+ skipKati bool
skipSoongTests bool
// From the product config
@@ -536,7 +537,10 @@
} else if arg == "showcommands" {
c.verbose = true
} else if arg == "--skip-make" {
- c.skipMake = true
+ c.skipConfig = true
+ c.skipKati = true
+ } else if arg == "--skip-kati" {
+ c.skipKati = true
} else if arg == "--skip-soong-tests" {
c.skipSoongTests = true
} else if len(arg) > 0 && arg[0] == '-' {
@@ -697,7 +701,7 @@
}
func (c *configImpl) NinjaArgs() []string {
- if c.skipMake {
+ if c.skipKati {
return c.arguments
}
return c.ninjaArgs
@@ -740,8 +744,12 @@
return c.verbose
}
-func (c *configImpl) SkipMake() bool {
- return c.skipMake
+func (c *configImpl) SkipKati() bool {
+ return c.skipKati
+}
+
+func (c *configImpl) SkipConfig() bool {
+ return c.skipConfig
}
func (c *configImpl) TargetProduct() string {