summaryrefslogtreecommitdiff
path: root/android/bazel.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/bazel.go')
-rw-r--r--android/bazel.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/android/bazel.go b/android/bazel.go
index 4ef8d7881..67002ecf6 100644
--- a/android/bazel.go
+++ b/android/bazel.go
@@ -338,9 +338,19 @@ func shouldKeepExistingBuildFileForDir(allowlist bp2BuildConversionAllowlist, di
return false
}
-// MixedBuildsEnabled checks that a module is ready to be replaced by a
+// MixedBuildsEnabled returns true if a module is ready to be replaced by a
+// converted or handcrafted Bazel target. As a side effect, calling this
+// method will also log whether this module is mixed build enabled for
+// metrics reporting.
+func MixedBuildsEnabled(ctx ModuleContext) bool {
+ mixedBuildEnabled := mixedBuildPossible(ctx)
+ ctx.Config().LogMixedBuild(ctx, mixedBuildEnabled)
+ return mixedBuildEnabled
+}
+
+// mixedBuildPossible returns true if a module is ready to be replaced by a
// converted or handcrafted Bazel target.
-func (b *BazelModuleBase) MixedBuildsEnabled(ctx ModuleContext) bool {
+func mixedBuildPossible(ctx ModuleContext) bool {
if ctx.Os() == Windows {
// Windows toolchains are not currently supported.
return false