summaryrefslogtreecommitdiff
path: root/android/bazel.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/bazel.go')
-rw-r--r--android/bazel.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/android/bazel.go b/android/bazel.go
index 202fc48ed..1602b9b02 100644
--- a/android/bazel.go
+++ b/android/bazel.go
@@ -81,6 +81,11 @@ type BazelConversionStatus struct {
// If non-nil, indicates that the module could not be converted successfully
// with bp2build. This will describe the reason the module could not be converted.
UnconvertedReason *UnconvertedReason
+
+ // The Partition this module will be installed on.
+ // TODO(b/306200980) Investigate how to handle modules that are installed in multiple
+ // partitions.
+ Partition string `blueprint:"mutated"`
}
// The reason a module could not be converted to a BUILD target via bp2build.
@@ -674,6 +679,9 @@ func bp2buildConversionMutator(ctx BottomUpMutatorContext) {
bModule.ConvertWithBp2build(ctx)
+ installCtx := &baseModuleContextToModuleInstallPathContext{ctx}
+ ctx.Module().base().setPartitionForBp2build(modulePartition(installCtx, true))
+
if len(ctx.Module().base().Bp2buildTargets()) == 0 && ctx.Module().base().GetUnconvertedReason() == nil {
panic(fmt.Errorf("illegal bp2build invariant: module '%s' was neither converted nor marked unconvertible", ctx.ModuleName()))
}