summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Usta (Tsering) Shrestha <usta@google.com> 2023-06-23 17:39:17 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-06-23 17:39:17 +0000
commita78884edf7200f3d230ff44ebe4406c8deb65a67 (patch)
treed1540c9ed76d5ae5627171f9ace2fc8bcb3fce31
parent019ffe121c2aca74e58aafc4b682e8405f2c8ad6 (diff)
parent49012eeacb2131070244d5c94bb8c31377de1985 (diff)
Merge "cosmetic"
-rw-r--r--ui/build/soong.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/ui/build/soong.go b/ui/build/soong.go
index 07d618841..a4cf7fbf0 100644
--- a/ui/build/soong.go
+++ b/ui/build/soong.go
@@ -532,13 +532,15 @@ func runSoong(ctx Context, config Config) {
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()
}
@@ -556,7 +558,7 @@ func runSoong(ctx Context, config Config) {
"-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 {
@@ -565,7 +567,7 @@ func runSoong(ctx Context, config Config) {
}
ninjaArgs = append(ninjaArgs, targets...)
- cmd := Command(ctx, config, "soong "+name,
+ cmd := Command(ctx, config, "soong bootstrap",
config.PrebuiltBuildTool("ninja"), ninjaArgs...)
var ninjaEnv Environment
@@ -606,7 +608,7 @@ func runSoong(ctx Context, config Config) {
targets = append(targets, config.SoongNinjaFile())
}
- ninja("bootstrap", "bootstrap.ninja", targets...)
+ ninja(targets...)
distGzipFile(ctx, config, config.SoongNinjaFile(), "soong")
distFile(ctx, config, config.SoongVarsFile(), "soong")