summaryrefslogtreecommitdiff
path: root/rust/protobuf.go
diff options
context:
space:
mode:
Diffstat (limited to 'rust/protobuf.go')
-rw-r--r--rust/protobuf.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/rust/protobuf.go b/rust/protobuf.go
index c8d2bdaeb..c3aa8dc64 100644
--- a/rust/protobuf.go
+++ b/rust/protobuf.go
@@ -305,7 +305,11 @@ func protoLibraryBp2build(ctx android.Bp2buildMutatorContext, m *Module) {
},
}
- ctx.CreateBazelTargetModule(
+ // TODO(b/295918553): Remove androidRestriction after rust toolchain for android is checked in.
+ var androidRestriction bazel.BoolAttribute
+ androidRestriction.SetSelectValue(bazel.OsConfigurationAxis, "android", proptools.BoolPtr(false))
+
+ ctx.CreateBazelTargetModuleWithRestrictions(
bazel.BazelTargetModuleProperties{
Rule_class: "proto_library",
},
@@ -317,9 +321,10 @@ func protoLibraryBp2build(ctx android.Bp2buildMutatorContext, m *Module) {
android.BazelLabelForModuleSrc(ctx, protoFiles),
),
},
+ androidRestriction,
)
- ctx.CreateBazelTargetModule(
+ ctx.CreateBazelTargetModuleWithRestrictions(
bazel.BazelTargetModuleProperties{
Rule_class: "rust_proto_library",
Bzl_load_location: "@rules_rust//proto/protobuf:defs.bzl",
@@ -333,5 +338,6 @@ func protoLibraryBp2build(ctx android.Bp2buildMutatorContext, m *Module) {
},
Deps: protoDeps,
},
+ androidRestriction,
)
}