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
This commit is contained in:
Chris Parsons
2021-04-20 15:32:07 -04:00
parent b8ea9f3cc8
commit ec1a3dc6f8
5 changed files with 53 additions and 27 deletions

View File

@@ -258,8 +258,8 @@ func Build(ctx Context, config Config, what int) {
// 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
}
}