diff options
author | 2023-10-13 11:32:14 -0700 | |
---|---|---|
committer | 2023-10-18 15:21:14 -0700 | |
commit | 11edf557b673f91995a4b9d26e47d942fba74dce (patch) | |
tree | 21ed6540ba0e35b5e55844ffc92a76b57ef0bff3 /android/module.go | |
parent | 03787bea6d58171c084ea8840f3a717137f60687 (diff) |
Add bazel-built modules as deps on the system image
These bazel-built modules will be installed into the system image
as part of the bazel rule, rather than going through the make staging
directory.
Bug: 297269187
Test: m bazel_sandwich
Change-Id: I96c6e58f8e0898b2ad92cb7069745ca2059a39f8
Diffstat (limited to 'android/module.go')
-rw-r--r-- | android/module.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/android/module.go b/android/module.go index b73f449fc..250161f46 100644 --- a/android/module.go +++ b/android/module.go @@ -572,6 +572,7 @@ type Module interface { Bp2buildTargets() []bp2buildInfo GetUnconvertedBp2buildDeps() []string GetMissingBp2buildDeps() []string + GetPartitionForBp2build() string BuildParamsForTests() []BuildParams RuleParamsForTests() map[blueprint.Rule]blueprint.RuleParams @@ -1651,6 +1652,10 @@ func (m *ModuleBase) addBp2buildInfo(info bp2buildInfo) { m.commonProperties.BazelConversionStatus.Bp2buildInfo = append(m.commonProperties.BazelConversionStatus.Bp2buildInfo, info) } +func (m *ModuleBase) setPartitionForBp2build(partition string) { + m.commonProperties.BazelConversionStatus.Partition = partition +} + func (m *ModuleBase) setBp2buildUnconvertible(reasonType bp2build_metrics_proto.UnconvertedReasonType, detail string) { m.commonProperties.BazelConversionStatus.UnconvertedReason = &UnconvertedReason{ ReasonType: int(reasonType), @@ -1667,6 +1672,11 @@ func (m *ModuleBase) Bp2buildTargets() []bp2buildInfo { return m.commonProperties.BazelConversionStatus.Bp2buildInfo } +// Bp2buildTargets returns the Bazel targets bp2build generated for this module. +func (m *ModuleBase) GetPartitionForBp2build() string { + return m.commonProperties.BazelConversionStatus.Partition +} + // AddUnconvertedBp2buildDep stores module name of a dependency that was not converted to Bazel. func (b *baseModuleContext) AddUnconvertedBp2buildDep(dep string) { unconvertedDeps := &b.Module().base().commonProperties.BazelConversionStatus.UnconvertedDeps |