Refactor MixedBuildsEnabled and add --ensure-allowlist-integrity.
Currently, there is little verification around allowlisted modules actually being mixed-built. This flag would allow us to verify that a module allowlisted is mixed-built for at least one variant. Bug: 278910100 Test: m nothing --bazel-mode-staging --ensure-allowlist-integrity Test: m nothing --bazel-mode-staging --ensure-allowlist-integrity --bazel-force-enabled-modules=com.google.android.neuralnetworks (This fails, as expected) Test: build/soong/test/mixed_mode_test.sh Change-Id: Icd5976f4f44f1a8caca1e5247d986642f7995f97
This commit is contained in:
@@ -59,7 +59,7 @@ func registerTestMutators(ctx android.RegistrationContext) {
|
||||
func mixedBuildsPrepareMutator(ctx android.BottomUpMutatorContext) {
|
||||
if m := ctx.Module(); m.Enabled() {
|
||||
if mixedBuildMod, ok := m.(android.MixedBuildBuildable); ok {
|
||||
if mixedBuildMod.IsMixedBuildSupported(ctx) && android.MixedBuildsEnabled(ctx) {
|
||||
if mixedBuildMod.IsMixedBuildSupported(ctx) && android.MixedBuildsEnabled(ctx) == android.MixedBuildEnabled {
|
||||
mixedBuildMod.QueueBazelCall(ctx)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user