diff options
author | Ting-Hsin Chen <tinghsin@google.com> | 2024-03-22 06:20:17 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-03-22 06:20:17 +0000 |
commit | 8d98a99ad7c8a090ca10a3b83e5cbb21f0fa8c47 (patch) | |
tree | 8365ac299dc56de1438e3edc019e99db87b41c38 | |
parent | 73d566156e950628f051a77739059d0552a88264 (diff) | |
parent | d4afe2048127ccf6008f1d20b8e88c5ee02d44f2 (diff) | |
download | soong-8d98a99ad7c8a090ca10a3b83e5cbb21f0fa8c47.tar.gz |
Merge "Revert "Convert BuildIgnoreApexContritbutions variable to a boolean"" into main
-rw-r--r-- | android/apex_contributions.go | 24 | ||||
-rw-r--r-- | android/config.go | 2 | ||||
-rw-r--r-- | android/variable.go | 2 |
3 files changed, 13 insertions, 15 deletions
diff --git a/android/apex_contributions.go b/android/apex_contributions.go index dd09fbf44..c76d9c235 100644 --- a/android/apex_contributions.go +++ b/android/apex_contributions.go @@ -115,6 +115,10 @@ func (a *allApexContributions) DepsMutator(ctx BottomUpMutatorContext) { func (a *allApexContributions) SetPrebuiltSelectionInfoProvider(ctx BaseModuleContext) { addContentsToProvider := func(p *PrebuiltSelectionInfoMap, m *apexContributions) { for _, content := range m.Contents() { + // Skip any apexes that have been added to the product specific ignore list + if InList(content, ctx.Config().BuildIgnoreApexContributionContents()) { + continue + } // Coverage builds for TARGET_RELEASE=foo should always build from source, // even if TARGET_RELEASE=foo uses prebuilt mainline modules. // This is necessary because the checked-in prebuilts were generated with @@ -137,19 +141,13 @@ func (a *allApexContributions) SetPrebuiltSelectionInfoProvider(ctx BaseModuleCo } p := PrebuiltSelectionInfoMap{} - // Skip apex_contributions if BuildApexContributionContents is true - // This product config var allows some products in the same family to use mainline modules from source - // (e.g. shiba and shiba_fullmte) - // Eventually these product variants will have their own release config maps. - if !proptools.Bool(ctx.Config().BuildIgnoreApexContributionContents()) { - ctx.VisitDirectDepsWithTag(acDepTag, func(child Module) { - if m, ok := child.(*apexContributions); ok { - addContentsToProvider(&p, m) - } else { - ctx.ModuleErrorf("%s is not an apex_contributions module\n", child.Name()) - } - }) - } + ctx.VisitDirectDepsWithTag(acDepTag, func(child Module) { + if m, ok := child.(*apexContributions); ok { + addContentsToProvider(&p, m) + } else { + ctx.ModuleErrorf("%s is not an apex_contributions module\n", child.Name()) + } + }) SetProvider(ctx, PrebuiltSelectionInfoProvider, p) } diff --git a/android/config.go b/android/config.go index 95e823309..10c30d4df 100644 --- a/android/config.go +++ b/android/config.go @@ -2083,6 +2083,6 @@ func (c *config) AllApexContributions() []string { return ret } -func (c *config) BuildIgnoreApexContributionContents() *bool { +func (c *config) BuildIgnoreApexContributionContents() []string { return c.productVariables.BuildIgnoreApexContributionContents } diff --git a/android/variable.go b/android/variable.go index 7a49a6838..73f5bfd1f 100644 --- a/android/variable.go +++ b/android/variable.go @@ -495,7 +495,7 @@ type ProductVariables struct { BuildFromSourceStub *bool `json:",omitempty"` - BuildIgnoreApexContributionContents *bool `json:",omitempty"` + BuildIgnoreApexContributionContents []string `json:",omitempty"` HiddenapiExportableStubs *bool `json:",omitempty"` |