Use --frontend_file for ninja instead of cat

Ninja now knows how to write directly to a file (or in our case, a named
pipe). This works around an issue we were seeing on Mac, where Go would
just hang after 50-2000 proto messages. It's also just a simpler
solution.

Bug: 111544015
Test: `m` with updated ninja on both Linux & Mac
Change-Id: Ic91920d83a6d2ea0b79e82b467e2423d78189f12
This commit is contained in:
Dan Willemsen 2018-07-17 17:54:31 -07:00
parent 0a4cfbc21a
commit 027366751d
2 changed files with 2 additions and 3 deletions

View file

@ -35,7 +35,7 @@ func runNinja(ctx Context, config Config) {
executable := config.PrebuiltBuildTool("ninja")
args := []string{
"-d", "keepdepfile",
fmt.Sprintf("--frontend=cat <&3 >%s", fifo),
"--frontend_file", fifo,
}
args = append(args, config.NinjaArgs()...)

View file

@ -15,7 +15,6 @@
package build
import (
"fmt"
"os"
"path/filepath"
"strconv"
@ -116,7 +115,7 @@ func runSoong(ctx Context, config Config) {
"-d", "keepdepfile",
"-w", "dupbuild=err",
"-j", strconv.Itoa(config.Parallel()),
fmt.Sprintf("--frontend=cat <&3 >%s", fifo),
"--frontend_file", fifo,
"-f", filepath.Join(config.SoongOutDir(), file))
cmd.Sandbox = soongSandbox
cmd.RunAndPrintOrFatal()