Merge "Skip cloning modules in bp2build"
diff --git a/cmd/soong_build/main.go b/cmd/soong_build/main.go
index e903c0a..d2eadba 100644
--- a/cmd/soong_build/main.go
+++ b/cmd/soong_build/main.go
@@ -817,6 +817,9 @@
 		ctx.SetNameInterface(newNameResolver(ctx.Config()))
 		ctx.RegisterForBazelConversion()
 		ctx.SetModuleListFile(cmdlineArgs.ModuleListFile)
+		// Skip cloning modules during bp2build's blueprint run. Some mutators set
+		// bp2build-related module values which should be preserved during codegen.
+		ctx.SkipCloneModulesAfterMutators = true
 
 		var ninjaDeps []string
 		ninjaDeps = append(ninjaDeps, extraNinjaDeps...)