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

Commit ee17f8c0 authored by Ramy Medhat's avatar Ramy Medhat Committed by Patrice Arruda
Browse files

Add Goma deprecation PSA to soong.

Test: build with Goma
Bug: b/166273085
Change-Id: Ie7e146285afd40bc0a1dc17a0b898960f57a118b
Merged-In: Ie7e146285afd40bc0a1dc17a0b898960f57a118b
parent d2c89f63
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -173,6 +173,7 @@ func main() {
	rbeMetricsFile := filepath.Join(logsDir, c.logsPrefix+"rbe_metrics.pb")
	soongMetricsFile := filepath.Join(logsDir, c.logsPrefix+"soong_metrics")
	defer build.UploadMetrics(buildCtx, config, c.forceDumbOutput, buildStarted, buildErrorFile, rbeMetricsFile, soongMetricsFile)
	defer build.PrintGomaDeprecation(buildCtx, config)

	os.MkdirAll(logsDir, 0777)
	log.SetOutput(filepath.Join(logsDir, c.logsPrefix+"soong.log"))
+10 −0
Original line number Diff line number Diff line
@@ -125,3 +125,13 @@ func DumpRBEMetrics(ctx Context, config Config, filename string) {
		ctx.Fatalf("failed to copy %q to %q: %v\n", metricsFile, filename, err)
	}
}

// PrintGomaDeprecation prints a PSA on the deprecation of Goma if it is set for the build.
func PrintGomaDeprecation(ctx Context, config Config) {
	if config.UseGoma() {
		fmt.Fprintln(ctx.Writer, "")
		fmt.Fprintln(ctx.Writer, "Goma for Android is being deprecated and replaced with RBE.")
		fmt.Fprintln(ctx.Writer, "See go/goma_android_deprecation for more details.")
		fmt.Fprintln(ctx.Writer, "")
	}
}