Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02736675 authored by Dan Willemsen's avatar Dan Willemsen
Browse files

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
parent 0a4cfbc2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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()...)
+1 −2
Original line number Diff line number Diff line
@@ -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()