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

Commit db6b17e7 authored by Ramy Medhat's avatar Ramy Medhat Committed by Automerger Merge Worker
Browse files

[DO NOT MERGE] Add Goma deprecation PSA to soong. am: ee50d5b5

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/12614869

Change-Id: I9503e5c8bbd0412973439f57ffe22f470201d092
parents c3e751fd ee50d5b5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -119,9 +119,11 @@ func main() {
		logsDir = filepath.Join(config.DistDir(), "logs")
	}

	buildErrorFile := filepath.Join(logsDir, logsPrefix+"build_error")
	rbeMetricsFile := filepath.Join(logsDir, logsPrefix+"rbe_metrics.pb")
	soongMetricsFile := filepath.Join(logsDir, logsPrefix+"soong_metrics")
	defer build.UploadMetrics(buildCtx, config, simpleOutput, buildStarted, rbeMetricsFile, soongMetricsFile)
	defer build.UploadMetrics(buildCtx, config, simpleOutput, buildStarted, buildErrorFile, rbeMetricsFile, soongMetricsFile)
	defer build.PrintGomaDeprecation(buildCtx, config)

	os.MkdirAll(logsDir, 0777)

+10 −0
Original line number Diff line number Diff line
@@ -128,3 +128,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, "")
	}
}