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:
@@ -206,7 +206,8 @@ func runSoong(ctx Context, config Config) {
|
||||
}
|
||||
}
|
||||
|
||||
integratedBp2Build := config.Environment().IsEnvTrue("INTEGRATED_BP2BUILD")
|
||||
buildMode := config.bazelBuildMode()
|
||||
integratedBp2Build := (buildMode == mixedBuild) || (buildMode == generateBuildFiles)
|
||||
|
||||
// This is done unconditionally, but does not take a measurable amount of time
|
||||
bootstrapBlueprint(ctx, config, integratedBp2Build)
|
||||
@@ -312,7 +313,7 @@ func runSoong(ctx Context, config Config) {
|
||||
|
||||
func shouldCollectBuildSoongMetrics(config Config) bool {
|
||||
// Do not collect metrics protobuf if the soong_build binary ran as the bp2build converter.
|
||||
return config.Environment().IsFalse("GENERATE_BAZEL_FILES")
|
||||
return config.bazelBuildMode() != generateBuildFiles
|
||||
}
|
||||
|
||||
func loadSoongBuildMetrics(ctx Context, config Config) *soong_metrics_proto.SoongBuildMetrics {
|
||||
|
Reference in New Issue
Block a user