summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author usta <usta@google.com> 2022-08-19 19:26:00 -0400
committer Usta (Tsering) Shrestha <usta@google.com> 2022-08-29 19:53:45 +0000
commitfb67fd121f42d199b84711613f67ff93003f9b25 (patch)
treecdb0ee7715b5f430528763706fa25c5c844f518b
parentfb9ca5c7e28283d5b5a66ed117b1bb365111d76d (diff)
cosmetic changes
Test: m nothing Bug: N/A Change-Id: Ic3d70339c7b98bf0733dc0e946f3683fe94f5c5b
-rw-r--r--ui/build/soong.go7
-rw-r--r--ui/status/ninja.go3
2 files changed, 4 insertions, 6 deletions
diff --git a/ui/build/soong.go b/ui/build/soong.go
index 3920ddddd..73678e4b3 100644
--- a/ui/build/soong.go
+++ b/ui/build/soong.go
@@ -170,9 +170,8 @@ func primaryBuilderInvocation(
commonArgs = append(commonArgs, "-l", filepath.Join(config.FileListDir(), "Android.bp.list"))
invocationEnv := make(map[string]string)
- debugMode := os.Getenv("SOONG_DELVE") != ""
-
- if debugMode {
+ if os.Getenv("SOONG_DELVE") != "" {
+ //debug mode
commonArgs = append(commonArgs, "--delve_listen", os.Getenv("SOONG_DELVE"))
commonArgs = append(commonArgs, "--delve_path", shared.ResolveDelveBinary())
// GODEBUG=asyncpreemptoff=1 disables the preemption of goroutines. This
@@ -187,7 +186,7 @@ func primaryBuilderInvocation(
invocationEnv["GODEBUG"] = "asyncpreemptoff=1"
}
- allArgs := make([]string, 0, 0)
+ var allArgs []string
allArgs = append(allArgs, specificArgs...)
allArgs = append(allArgs,
"--globListDir", name,
diff --git a/ui/status/ninja.go b/ui/status/ninja.go
index 4d9962153..fc0e21a05 100644
--- a/ui/status/ninja.go
+++ b/ui/status/ninja.go
@@ -35,8 +35,7 @@ import (
func NewNinjaReader(ctx logger.Logger, status ToolStatus, fifo string) *NinjaReader {
os.Remove(fifo)
- err := syscall.Mkfifo(fifo, 0666)
- if err != nil {
+ if err := syscall.Mkfifo(fifo, 0666); err != nil {
ctx.Fatalf("Failed to mkfifo(%q): %v", fifo, err)
}