Add product_config module
product_config module will export productVariables struct (defined in
android/variable.go). Other modules can depend on product_Config module
to read product variables, without needing to update Soong.
Bug: 346214955
Test: build and see output of product_config module
Change-Id: I06e1d2716dc2a8b90984bb46c5fc901cd1ca5020
diff --git a/ui/build/config.go b/ui/build/config.go
index feded1c..a217d48 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -1488,6 +1488,15 @@
}
}
+func (c *configImpl) SoongExtraVarsFile() string {
+ targetProduct, err := c.TargetProductOrErr()
+ if err != nil {
+ return filepath.Join(c.SoongOutDir(), "soong.extra.variables")
+ } else {
+ return filepath.Join(c.SoongOutDir(), "soong."+targetProduct+".extra.variables")
+ }
+}
+
func (c *configImpl) SoongNinjaFile() string {
targetProduct, err := c.TargetProductOrErr()
if err != nil {