Speed up build_test
Stop writing out ninja files, as they become very large, especially when
multiplied by the number of defined products.
Test: treehugger
Change-Id: Id9529d14040acb72a0188e58b5db2911f142071e
diff --git a/ui/build/config.go b/ui/build/config.go
index 840f505..5a6d5db 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -143,6 +143,9 @@
"ANDROID_DEV_SCRIPTS",
"ANDROID_EMULATOR_PREBUILTS",
"ANDROID_PRE_BUILD_PATHS",
+
+ // Only set in multiproduct_kati after config generation
+ "EMPTY_NINJA_FILE",
)
// Tell python not to spam the source tree with .pyc files.
diff --git a/ui/build/kati.go b/ui/build/kati.go
index 56e9a88..d2e9fe9 100644
--- a/ui/build/kati.go
+++ b/ui/build/kati.go
@@ -81,6 +81,10 @@
"--kati_stats",
}, args...)
+ if config.Environment().IsEnvTrue("EMPTY_NINJA_FILE") {
+ args = append(args, "--empty_ninja_file")
+ }
+
cmd := Command(ctx, config, "ckati", executable, args...)
cmd.Sandbox = katiSandbox
pipe, err := cmd.StdoutPipe()