Change mixed soong/bazel builds to use USE_BAZEL_ANALYSIS

As a result, one can enable bazel-as-ninja-executor separately from
mixed builds.

Test: Manually verified building image with and without bazelenv.sh.
Change-Id: Ia97806fb41e1de850a80b9483ed8a5ff50d9dab2
This commit is contained in:
Chris Parsons
2020-10-27 18:59:25 -04:00
parent e10dfa4e3d
commit 8b77a009e2
2 changed files with 9 additions and 3 deletions

View File

@@ -119,7 +119,9 @@ func (n noopBazelContext) BazelEnabled() bool {
}
func NewBazelContext(c *config) (BazelContext, error) {
if c.Getenv("USE_BAZEL") != "1" {
// TODO(cparsons): Assess USE_BAZEL=1 instead once "mixed Soong/Bazel builds"
// are production ready.
if c.Getenv("USE_BAZEL_ANALYSIS") != "1" {
return noopBazelContext{}, nil
}