Loading cmd/soong_ui/main.go +0 −4 Original line number Diff line number Diff line Loading @@ -176,10 +176,6 @@ func main() { build.SetupOutDir(buildCtx, config) if config.UseBazel() && config.Dist() { defer populateExternalDistDir(buildCtx, config) } // Set up files to be outputted in the log directory. logsDir := config.LogsDir() Loading ui/build/build.go +3 −7 Original line number Diff line number Diff line Loading @@ -107,7 +107,6 @@ const ( RunBazel = 1 << iota RunBuildTests = 1 << iota RunAll = RunProductConfig | RunSoong | RunKati | RunKatiNinja | RunNinja RunAllWithBazel = RunProductConfig | RunSoong | RunKati | RunKatiNinja | RunBazel ) // checkBazelMode fails the build if there are conflicting arguments for which bazel Loading Loading @@ -256,9 +255,6 @@ func Build(ctx Context, config Config) { SetupPath(ctx, config) what := RunAll if config.UseBazel() { what = RunAllWithBazel } if config.Checkbuild() { what |= RunBuildTests } Loading ui/build/config.go +1 −32 Original line number Diff line number Diff line Loading @@ -99,15 +99,9 @@ type configImpl struct { pathReplaced bool // TODO(b/243077098): Remove useBazel. useBazel bool bazelProdMode bool bazelDevMode bool // During Bazel execution, Bazel cannot write outside OUT_DIR. // So if DIST_DIR is set to an external dir (outside of OUT_DIR), we need to rig it temporarily and then migrate files at the end of the build. riggedDistDirForBazel string // Set by multiproduct_kati emptyNinjaFile bool Loading Loading @@ -439,21 +433,6 @@ func NewConfig(ctx Context, args ...string) Config { ctx.Fatalf("Unable to remove bazel profile directory %q: %v", bpd, err) } ret.useBazel = ret.environ.IsEnvTrue("USE_BAZEL") if ret.UseBazel() { if err := os.MkdirAll(bpd, 0777); err != nil { ctx.Fatalf("Failed to create bazel profile directory %q: %v", bpd, err) } } if ret.UseBazel() { ret.riggedDistDirForBazel = filepath.Join(ret.OutDir(), "dist") } else { // Not rigged ret.riggedDistDirForBazel = ret.distDir } c := Config{ret} storeConfigMetrics(ctx, c) return c Loading Loading @@ -486,7 +465,6 @@ func buildConfig(config Config) *smpb.BuildConfig { ForceUseGoma: proto.Bool(config.ForceUseGoma()), UseGoma: proto.Bool(config.UseGoma()), UseRbe: proto.Bool(config.UseRBE()), BazelAsNinja: proto.Bool(config.UseBazel()), BazelMixedBuild: proto.Bool(config.BazelBuildEnabled()), } c.Targets = append(c.Targets, config.arguments...) Loading Loading @@ -877,12 +855,8 @@ func (c *configImpl) OutDir() string { } func (c *configImpl) DistDir() string { if c.UseBazel() { return c.riggedDistDirForBazel } else { return c.distDir } } func (c *configImpl) RealDistDir() string { return c.distDir Loading Loading @@ -1129,11 +1103,6 @@ func (c *configImpl) UseRBE() bool { return false } // TODO(b/243077098): Remove UseBazel. func (c *configImpl) UseBazel() bool { return c.useBazel } func (c *configImpl) BazelBuildEnabled() bool { return c.bazelProdMode || c.bazelDevMode } Loading ui/build/config_test.go +0 −11 Original line number Diff line number Diff line Loading @@ -1017,7 +1017,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(false), BazelMixedBuild: proto.Bool(false), }, }, Loading @@ -1028,7 +1027,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(true), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(false), BazelMixedBuild: proto.Bool(false), }, }, Loading @@ -1039,7 +1037,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(true), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(false), BazelMixedBuild: proto.Bool(false), }, }, Loading @@ -1050,7 +1047,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(true), BazelAsNinja: proto.Bool(false), BazelMixedBuild: proto.Bool(false), }, }, Loading @@ -1062,7 +1058,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(true), BazelMixedBuild: proto.Bool(false), }, }, Loading @@ -1073,7 +1068,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(false), BazelMixedBuild: proto.Bool(true), }, }, Loading @@ -1085,7 +1079,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(false), BazelMixedBuild: proto.Bool(true), }, }, Loading @@ -1097,7 +1090,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(false), BazelMixedBuild: proto.Bool(true), }, }, Loading @@ -1110,7 +1102,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(true), BazelMixedBuild: proto.Bool(false), Targets: []string{"droid", "dist"}, }, Loading @@ -1128,7 +1119,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(true), UseGoma: proto.Bool(true), UseRbe: proto.Bool(true), BazelAsNinja: proto.Bool(true), BazelMixedBuild: proto.Bool(true), }, }, Loading @@ -1139,7 +1129,6 @@ func TestBuildConfig(t *testing.T) { t.Run(tc.name, func(t *testing.T) { c := &configImpl{ environ: &tc.environ, useBazel: tc.useBazel, bazelDevMode: tc.bazelDevMode, bazelProdMode: tc.bazelProdMode, arguments: tc.arguments, Loading Loading
cmd/soong_ui/main.go +0 −4 Original line number Diff line number Diff line Loading @@ -176,10 +176,6 @@ func main() { build.SetupOutDir(buildCtx, config) if config.UseBazel() && config.Dist() { defer populateExternalDistDir(buildCtx, config) } // Set up files to be outputted in the log directory. logsDir := config.LogsDir() Loading
ui/build/build.go +3 −7 Original line number Diff line number Diff line Loading @@ -107,7 +107,6 @@ const ( RunBazel = 1 << iota RunBuildTests = 1 << iota RunAll = RunProductConfig | RunSoong | RunKati | RunKatiNinja | RunNinja RunAllWithBazel = RunProductConfig | RunSoong | RunKati | RunKatiNinja | RunBazel ) // checkBazelMode fails the build if there are conflicting arguments for which bazel Loading Loading @@ -256,9 +255,6 @@ func Build(ctx Context, config Config) { SetupPath(ctx, config) what := RunAll if config.UseBazel() { what = RunAllWithBazel } if config.Checkbuild() { what |= RunBuildTests } Loading
ui/build/config.go +1 −32 Original line number Diff line number Diff line Loading @@ -99,15 +99,9 @@ type configImpl struct { pathReplaced bool // TODO(b/243077098): Remove useBazel. useBazel bool bazelProdMode bool bazelDevMode bool // During Bazel execution, Bazel cannot write outside OUT_DIR. // So if DIST_DIR is set to an external dir (outside of OUT_DIR), we need to rig it temporarily and then migrate files at the end of the build. riggedDistDirForBazel string // Set by multiproduct_kati emptyNinjaFile bool Loading Loading @@ -439,21 +433,6 @@ func NewConfig(ctx Context, args ...string) Config { ctx.Fatalf("Unable to remove bazel profile directory %q: %v", bpd, err) } ret.useBazel = ret.environ.IsEnvTrue("USE_BAZEL") if ret.UseBazel() { if err := os.MkdirAll(bpd, 0777); err != nil { ctx.Fatalf("Failed to create bazel profile directory %q: %v", bpd, err) } } if ret.UseBazel() { ret.riggedDistDirForBazel = filepath.Join(ret.OutDir(), "dist") } else { // Not rigged ret.riggedDistDirForBazel = ret.distDir } c := Config{ret} storeConfigMetrics(ctx, c) return c Loading Loading @@ -486,7 +465,6 @@ func buildConfig(config Config) *smpb.BuildConfig { ForceUseGoma: proto.Bool(config.ForceUseGoma()), UseGoma: proto.Bool(config.UseGoma()), UseRbe: proto.Bool(config.UseRBE()), BazelAsNinja: proto.Bool(config.UseBazel()), BazelMixedBuild: proto.Bool(config.BazelBuildEnabled()), } c.Targets = append(c.Targets, config.arguments...) Loading Loading @@ -877,12 +855,8 @@ func (c *configImpl) OutDir() string { } func (c *configImpl) DistDir() string { if c.UseBazel() { return c.riggedDistDirForBazel } else { return c.distDir } } func (c *configImpl) RealDistDir() string { return c.distDir Loading Loading @@ -1129,11 +1103,6 @@ func (c *configImpl) UseRBE() bool { return false } // TODO(b/243077098): Remove UseBazel. func (c *configImpl) UseBazel() bool { return c.useBazel } func (c *configImpl) BazelBuildEnabled() bool { return c.bazelProdMode || c.bazelDevMode } Loading
ui/build/config_test.go +0 −11 Original line number Diff line number Diff line Loading @@ -1017,7 +1017,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(false), BazelMixedBuild: proto.Bool(false), }, }, Loading @@ -1028,7 +1027,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(true), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(false), BazelMixedBuild: proto.Bool(false), }, }, Loading @@ -1039,7 +1037,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(true), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(false), BazelMixedBuild: proto.Bool(false), }, }, Loading @@ -1050,7 +1047,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(true), BazelAsNinja: proto.Bool(false), BazelMixedBuild: proto.Bool(false), }, }, Loading @@ -1062,7 +1058,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(true), BazelMixedBuild: proto.Bool(false), }, }, Loading @@ -1073,7 +1068,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(false), BazelMixedBuild: proto.Bool(true), }, }, Loading @@ -1085,7 +1079,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(false), BazelMixedBuild: proto.Bool(true), }, }, Loading @@ -1097,7 +1090,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(false), BazelMixedBuild: proto.Bool(true), }, }, Loading @@ -1110,7 +1102,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(false), UseGoma: proto.Bool(false), UseRbe: proto.Bool(false), BazelAsNinja: proto.Bool(true), BazelMixedBuild: proto.Bool(false), Targets: []string{"droid", "dist"}, }, Loading @@ -1128,7 +1119,6 @@ func TestBuildConfig(t *testing.T) { ForceUseGoma: proto.Bool(true), UseGoma: proto.Bool(true), UseRbe: proto.Bool(true), BazelAsNinja: proto.Bool(true), BazelMixedBuild: proto.Bool(true), }, }, Loading @@ -1139,7 +1129,6 @@ func TestBuildConfig(t *testing.T) { t.Run(tc.name, func(t *testing.T) { c := &configImpl{ environ: &tc.environ, useBazel: tc.useBazel, bazelDevMode: tc.bazelDevMode, bazelProdMode: tc.bazelProdMode, arguments: tc.arguments, Loading