Merge "Add Goma deprecation PSA to soong."

This commit is contained in:
Treehugger Robot
2020-08-21 04:26:11 +00:00
committed by Gerrit Code Review
2 changed files with 11 additions and 0 deletions

View File

@@ -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.simpleOutput, buildStarted, buildErrorFile, rbeMetricsFile, soongMetricsFile)
defer build.PrintGomaDeprecation(buildCtx, config)
os.MkdirAll(logsDir, 0777)
log.SetOutput(filepath.Join(logsDir, c.logsPrefix+"soong.log"))

View File

@@ -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, "")
}
}