Move auto installclean to soong_ui
This way kati won't need to be run as often (either initially, or when
switching products with the same device).
Bug: 35970961
Test: m clean; m -j blueprint_tools; m -j blueprint_tools; m -j blueprint_tools
Test: lunch aosp_arm-eng; m -j blueprint_tools; lunch full-eng; m -j blueprint_tools; <repeat>
Change-Id: Ie9fca3c8f1dd412459ea47c7090c7c5fdb0bcf6e
diff --git a/ui/build/make.go b/ui/build/make.go
index 32dc17b..2b39926 100644
--- a/ui/build/make.go
+++ b/ui/build/make.go
@@ -83,6 +83,7 @@
// So that we can use the correct TARGET_PRODUCT if it's been
// modified by PRODUCT-* arguments
"TARGET_PRODUCT",
+ "TARGET_BUILD_VARIANT",
// compiler wrappers set up by make
"CC_WRAPPER",
@@ -129,6 +130,9 @@
// Used to execute Kati and Ninja
"NINJA_GOALS",
"KATI_GOALS",
+
+ // To find target/product/<DEVICE>
+ "TARGET_DEVICE",
}, exportEnvVars...), bannerVars...)
make_vars, err := DumpMakeVars(ctx, config, config.Arguments(), []string{
@@ -159,4 +163,5 @@
config.SetKatiArgs(strings.Fields(make_vars["KATI_GOALS"]))
config.SetNinjaArgs(strings.Fields(make_vars["NINJA_GOALS"]))
+ config.SetTargetDevice(make_vars["TARGET_DEVICE"])
}