Add Goma deprecation PSA to soong.

Test: build with Goma
Change-Id: Ie7e146285afd40bc0a1dc17a0b898960f57a118b
This commit is contained in:
Ramy Medhat
2020-08-18 17:29:48 -04:00
parent 1b7bc1c4b2
commit f668917c25
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, "")
}
}