From e4e85d5f9f906a3bb9586a7f4da85f15f625c69d Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Wed, 25 Oct 2023 23:53:58 +0900 Subject: [PATCH] Export build flags to soong. This exports a map of build flags used in this release config to Soong. Bug: 302514918 Test: manual Change-Id: Id95c03e14cfbb91c0cb9c8c37a065b8387733317 --- android/config.go | 5 +++++ android/variable.go | 2 ++ 2 files changed, 7 insertions(+) diff --git a/android/config.go b/android/config.go index 213fa2f6b..4c31bb052 100644 --- a/android/config.go +++ b/android/config.go @@ -2124,3 +2124,8 @@ func (c *deviceConfig) ReleaseExposeFlaggedApi() bool { func (c *deviceConfig) HideFlaggedApis() bool { return c.NextReleaseHideFlaggedApi() && !c.ReleaseExposeFlaggedApi() } + +func (c *config) GetBuildFlag(name string) (string, bool) { + val, ok := c.productVariables.BuildFlags[name] + return val, ok +} diff --git a/android/variable.go b/android/variable.go index 9896f2020..648e4cf18 100644 --- a/android/variable.go +++ b/android/variable.go @@ -492,6 +492,8 @@ type ProductVariables struct { NextReleaseHideFlaggedApi *bool `json:",omitempty"` Release_expose_flagged_api *bool `json:",omitempty"` + + BuildFlags map[string]string `json:",omitempty"` } type PartitionQualifiedVariablesType struct {