cosmetic
ninja() is only called for soong bootstrap now
Test: NA
Bug: NA
Change-Id: Iededf601dc3bb92d8681b1e008bf20b4da406f4c
diff --git a/ui/build/soong.go b/ui/build/soong.go
index 59a3242..59d4fa8 100644
--- a/ui/build/soong.go
+++ b/ui/build/soong.go
@@ -529,13 +529,15 @@
runMicrofactory(ctx, config, "bpglob", "github.com/google/blueprint/bootstrap/bpglob",
map[string]string{"github.com/google/blueprint": "build/blueprint"})
- ninja := func(name, ninjaFile string, targets ...string) {
- ctx.BeginTrace(metrics.RunSoong, name)
+ ninja := func(targets ...string) {
+ ctx.BeginTrace(metrics.RunSoong, "bootstrap")
defer ctx.EndTrace()
if config.IsPersistentBazelEnabled() {
bazelProxy := bazel.NewProxyServer(ctx.Logger, config.OutDir(), filepath.Join(config.SoongOutDir(), "workspace"), config.GetBazeliskBazelVersion())
- bazelProxy.Start()
+ if err := bazelProxy.Start(); err != nil {
+ ctx.Fatalf("Failed to create bazel proxy")
+ }
defer bazelProxy.Close()
}
@@ -553,7 +555,7 @@
"-w", "missingoutfile=err",
"-j", strconv.Itoa(config.Parallel()),
"--frontend_file", fifo,
- "-f", filepath.Join(config.SoongOutDir(), ninjaFile),
+ "-f", filepath.Join(config.SoongOutDir(), "bootstrap.ninja"),
}
if extra, ok := config.Environment().Get("SOONG_UI_NINJA_ARGS"); ok {
@@ -562,7 +564,7 @@
}
ninjaArgs = append(ninjaArgs, targets...)
- cmd := Command(ctx, config, "soong "+name,
+ cmd := Command(ctx, config, "soong bootstrap",
config.PrebuiltBuildTool("ninja"), ninjaArgs...)
var ninjaEnv Environment
@@ -603,7 +605,7 @@
targets = append(targets, config.SoongNinjaFile())
}
- ninja("bootstrap", "bootstrap.ninja", targets...)
+ ninja(targets...)
distGzipFile(ctx, config, config.SoongNinjaFile(), "soong")
distFile(ctx, config, config.SoongVarsFile(), "soong")