Register bp2build module types even outside generation

Without this fix, mixed builds are silently disabled, as a recent change
disabled mixed builds for all module types which are not listed in this
map. This map should be populated for both bp2build generation and for
mixed builds.

Test: lunch aosp_flame && USE_BAZEL_ANALYSIS=1 m libc
Change-Id: Ib2a3fb2de2e7a5204ef01355522ae569e0424dc7
This commit is contained in:
Chris Parsons
2021-03-29 20:06:57 -04:00
parent 4f6d15465b
commit b164b381b2
2 changed files with 12 additions and 1 deletions

View File

@@ -192,6 +192,15 @@ func (ctx *Context) Register() {
t.register(ctx)
}
if ctx.config.BazelContext.BazelEnabled() {
// Hydrate the configuration of bp2build-enabled module types. This is
// required as a signal to identify which modules should be deferred to
// Bazel in mixed builds, if it is enabled.
for t, _ := range bp2buildMutators {
ctx.config.bp2buildModuleTypeConfig[t] = true
}
}
mutators := collateGloballyRegisteredMutators()
mutators.registerAll(ctx)