Create a new product variable to gate blueprint files
Users can use this feature by
1. Setting PRODUCT_INCLUDE_TAGS += <val> in their product mk files
2. Set
```
blueprint_packge_includes {
match_al: ["<val>"],
}
other_module_type {name: foo}
other_module_type {name: bar}
```
bar and foo will be included if and only if <val> is set
Test: Unit tests in blueprint
Test: TH
Change-Id: I32eed4e3b5ac47fb565c62d13d8881fa984c86f4
diff --git a/ui/build/config.go b/ui/build/config.go
index 7651a0f..ef2e87e 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -111,6 +111,8 @@
metricsUploader string
bazelForceEnabledModules string
+
+ includeTags []string
}
const srcDirFileCheck = "build/soong/root.bp"
@@ -1079,6 +1081,14 @@
return c.parallel
}
+func (c *configImpl) GetIncludeTags() []string {
+ return c.includeTags
+}
+
+func (c *configImpl) SetIncludeTags(i []string) {
+ c.includeTags = i
+}
+
func (c *configImpl) HighmemParallel() int {
if i, ok := c.environ.GetInt("NINJA_HIGHMEM_NUM_JOBS"); ok {
return i