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:
@@ -279,8 +279,9 @@ func propsToAttributes(props map[string]string) string {
|
||||
}
|
||||
|
||||
type conversionResults struct {
|
||||
buildFileToTargets map[string]BazelTargets
|
||||
metrics CodegenMetrics
|
||||
buildFileToTargets map[string]BazelTargets
|
||||
moduleNameToPartition map[string]string
|
||||
metrics CodegenMetrics
|
||||
}
|
||||
|
||||
func (r conversionResults) BuildDirToTargets() map[string]BazelTargets {
|
||||
@@ -707,6 +708,7 @@ func GenerateBazelTargets(ctx *CodegenContext, generateFilegroups bool) (convers
|
||||
metrics := CreateCodegenMetrics()
|
||||
|
||||
dirs := make(map[string]bool)
|
||||
moduleNameToPartition := make(map[string]string)
|
||||
|
||||
var errs []error
|
||||
|
||||
@@ -754,6 +756,9 @@ func GenerateBazelTargets(ctx *CodegenContext, generateFilegroups bool) (convers
|
||||
metrics.IncrementRuleClassCount(t.ruleClass)
|
||||
}
|
||||
|
||||
// record the partition
|
||||
moduleNameToPartition[android.RemoveOptionalPrebuiltPrefix(aModule.Name())] = aModule.GetPartitionForBp2build()
|
||||
|
||||
// Log the module.
|
||||
metrics.AddConvertedModule(aModule, moduleType, dir)
|
||||
|
||||
@@ -876,8 +881,9 @@ func GenerateBazelTargets(ctx *CodegenContext, generateFilegroups bool) (convers
|
||||
}
|
||||
|
||||
return conversionResults{
|
||||
buildFileToTargets: buildFileToTargets,
|
||||
metrics: metrics,
|
||||
buildFileToTargets: buildFileToTargets,
|
||||
moduleNameToPartition: moduleNameToPartition,
|
||||
metrics: metrics,
|
||||
}, errs
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user