Allow specifying a build variant

Test: multiproduct_kati --variant userdebug
Change-Id: I6548889caf868cad6270110c038753d029247572
This commit is contained in:
Dan Willemsen 2017-05-07 11:40:30 -07:00
parent a4e43a77d8
commit 5ed900be48
1 changed files with 3 additions and 1 deletions

View File

@ -51,6 +51,8 @@ var outDir = flag.String("out", "", "path to store output directories (defaults
var onlyConfig = flag.Bool("only-config", false, "Only run product config (not Soong or Kati)")
var onlySoong = flag.Bool("only-soong", false, "Only run product config and Soong (not Kati)")
var buildVariant = flag.String("variant", "eng", "build variant to use")
type Product struct {
ctx build.Context
config build.Config
@ -225,7 +227,7 @@ func main() {
productConfig := build.NewConfig(productCtx)
productConfig.Environment().Set("OUT_DIR", productOutDir)
productConfig.Lunch(productCtx, product, "eng")
productConfig.Lunch(productCtx, product, *buildVariant)
build.Build(productCtx, productConfig, build.BuildProductConfig)
productConfigs <- Product{productCtx, productConfig}