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
This commit is contained in:
Cole Faust
2023-10-13 11:32:14 -07:00
parent 03787bea6d
commit 11edf557b6
11 changed files with 300 additions and 123 deletions

View File

@@ -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