Log information for Mixed Builds modules.
Test: Output matches expected. https://paste.googleplex.com/5913495636803584?raw Performance evaluated: https://docs.google.com/spreadsheets/d/1X7eOVBKEZUwUWl5i8CDfBo9yUeZrDPXWi2JYO4BEZt4/edit?resourcekey=0-co8crIFW9dpiedhCMkhAgw#gid=0 Change-Id: I88780c7cc52a189a72216c5e2e499c96574b3731
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user