summaryrefslogtreecommitdiff
path: root/rust/rust.go
diff options
context:
space:
mode:
Diffstat (limited to 'rust/rust.go')
-rw-r--r--rust/rust.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/rust/rust.go b/rust/rust.go
index 689ff38c0..edd04ac72 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -16,6 +16,7 @@ package rust
import (
"android/soong/bloaty"
+ "android/soong/ui/metrics/bp2build_metrics_proto"
"fmt"
"strings"
@@ -169,6 +170,8 @@ type Module struct {
apexSdkVersion android.ApiLevel
transitiveAndroidMkSharedLibs *android.DepSet[string]
+
+ android.BazelModuleBase
}
func (mod *Module) Header() bool {
@@ -1841,6 +1844,14 @@ func (c *Module) Partition() string {
return ""
}
+func (m *Module) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
+ if ctx.ModuleType() == "rust_library_host" || ctx.ModuleType() == "rust_library" {
+ libraryBp2build(ctx, m)
+ } else {
+ ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED, "")
+ }
+}
+
var Bool = proptools.Bool
var BoolDefault = proptools.BoolDefault
var String = proptools.String