Add PRODUCT_SOONG_ONLY
Setting this product variable will cause the product to be built
with only soong (no kati) by default.
This is what we will enable to launch soong-only builds, but will
also be needed to test atest in soong-only builds, as atest won't
pass --soong-only when it runs soong.
Bug: 376727180
Test: manually
Change-Id: Ie6148ffecdc1e0a46821136b2f4601d757b3d7ad
diff --git a/ui/build/dumpvars.go b/ui/build/dumpvars.go
index b592f11..d5aab54 100644
--- a/ui/build/dumpvars.go
+++ b/ui/build/dumpvars.go
@@ -246,6 +246,8 @@
// `true` will relegate missing outputs to warnings.
"BUILD_BROKEN_MISSING_OUTPUTS",
+ "PRODUCT_SOONG_ONLY",
+
// Not used, but useful to be in the soong.log
"TARGET_BUILD_TYPE",
"HOST_ARCH",
@@ -314,4 +316,11 @@
config.SetBuildBrokenNinjaUsesEnvVars(strings.Fields(makeVars["BUILD_BROKEN_NINJA_USES_ENV_VARS"]))
config.SetSourceRootDirs(strings.Fields(makeVars["PRODUCT_SOURCE_ROOT_DIRS"]))
config.SetBuildBrokenMissingOutputs(makeVars["BUILD_BROKEN_MISSING_OUTPUTS"] == "true")
+
+ if !config.skipKatiControlledByFlags {
+ if makeVars["PRODUCT_SOONG_ONLY"] == "true" {
+ config.skipKati = true
+ config.skipKatiNinja = true
+ }
+ }
}