Various cleanup in soong_ui to aid new feature
- Rename the "BuildX" variables to "RunX"
- Remove redundant comments
- Inline all the "what to do" based on config in build.go
- Inline some constants only used in one place
Bug: 189187214
Test: m nothing
Test: build/soong/build_test.bash
Change-Id: I111a69e642212d7938d4971283545e0d9acbb01a
Merged-In: I111a69e642212d7938d4971283545e0d9acbb01a
(cherry picked from commit d274ea91968b95ef7a2edd2d604afbc237e84ff9)
diff --git a/cmd/soong_ui/main.go b/cmd/soong_ui/main.go
index 390a9ec..22922c0 100644
--- a/cmd/soong_ui/main.go
+++ b/cmd/soong_ui/main.go
@@ -59,12 +59,10 @@
run func(ctx build.Context, config build.Config, args []string, logsDir string)
}
-const makeModeFlagName = "--make-mode"
-
// list of supported commands (flags) supported by soong ui
var commands []command = []command{
{
- flag: makeModeFlagName,
+ flag: "--make-mode",
description: "build the modules by the target name (i.e. soong_docs)",
config: func(ctx build.Context, args ...string) build.Config {
return build.NewConfig(ctx, args...)
@@ -506,15 +504,7 @@
ctx.Fatal("done")
}
- toBuild := build.BuildAll
- if config.UseBazel() {
- toBuild = build.BuildAllWithBazel
- }
-
- if config.Checkbuild() {
- toBuild |= build.RunBuildTests
- }
- build.Build(ctx, config, toBuild)
+ build.Build(ctx, config)
}
// getCommand finds the appropriate command based on args[1] flag. args[0]