Define UseBazel in Config
The UseBazel() function will be used in several places to perform
different functionality such as setting up the metrics path.
Bug: b/173028918
Test: m nothing
Change-Id: Ie94073b8f0552ec7528e1cc2f3be74b693dc3135
diff --git a/cmd/soong_ui/main.go b/cmd/soong_ui/main.go
index e778bd6..aee8e5a 100644
--- a/cmd/soong_ui/main.go
+++ b/cmd/soong_ui/main.go
@@ -471,11 +471,9 @@
ctx.Fatal("done")
}
- var toBuild int
- if _, ok := config.Environment().Get("USE_BAZEL"); ok {
+ toBuild := build.BuildAll
+ if config.UseBazel() {
toBuild = build.BuildAllWithBazel
- } else {
- toBuild = build.BuildAll
}
if config.Checkbuild() {