Subsume INTEGRATED_BP2BUILD into other env modes
This refactors bazel-build mode determination logic in soong_ui so it's
clearer which of three possible modes are being used in a given
invocation (NO_BAZEL, GENERATE_BUILD_FILES, or MIXED_BUILDS).
Test: bootstrap tests
Change-Id: I41d2baebf8d560c2cc42db8daa8b936101d453e3
diff --git a/ui/build/build.go b/ui/build/build.go
index 3692f4f..c2ad057 100644
--- a/ui/build/build.go
+++ b/ui/build/build.go
@@ -258,8 +258,8 @@
// Run Soong
runSoong(ctx, config)
- if config.Environment().IsEnvTrue("GENERATE_BAZEL_FILES") {
- // Return early, if we're using Soong as the bp2build converter.
+ if config.bazelBuildMode() == generateBuildFiles {
+ // Return early, if we're using Soong as solely the generator of BUILD files.
return
}
}