Loading cmd/soong_ui/main.go +0 −1 Original line number Diff line number Diff line Loading @@ -173,7 +173,6 @@ 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")) Loading ui/build/config.go +24 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import ( "time" "android/soong/shared" "github.com/golang/protobuf/proto" smpb "android/soong/ui/metrics/metrics_proto" Loading Loading @@ -183,6 +184,17 @@ func NewConfig(ctx Context, args ...string) Config { "EMPTY_NINJA_FILE", ) if ret.UseGoma() { ctx.Println("Goma for Android is being deprecated and replaced with RBE. See go/rbe_for_android for instructions on how to use RBE.") ctx.Println() ctx.Println("See go/goma_android_exceptions for exceptions.") ctx.Fatalln("USE_GOMA flag is no longer supported.") } if ret.ForceUseGoma() { ret.environ.Set("USE_GOMA", "true") } // Tell python not to spam the source tree with .pyc files. ret.environ.Set("PYTHONDONTWRITEBYTECODE", "1") Loading Loading @@ -778,6 +790,18 @@ func (c *configImpl) TotalRAM() uint64 { return c.totalRAM } // ForceUseGoma determines whether we should override Goma deprecation // and use Goma for the current build or not. func (c *configImpl) ForceUseGoma() bool { if v, ok := c.environ.Get("FORCE_USE_GOMA"); ok { v = strings.TrimSpace(v) if v != "" && v != "false" { return true } } return false } func (c *configImpl) UseGoma() bool { if v, ok := c.environ.Get("USE_GOMA"); ok { v = strings.TrimSpace(v) Loading ui/build/rbe.go +0 −10 Original line number Diff line number Diff line Loading @@ -151,13 +151,3 @@ 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, "") } } Loading
cmd/soong_ui/main.go +0 −1 Original line number Diff line number Diff line Loading @@ -173,7 +173,6 @@ 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")) Loading
ui/build/config.go +24 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import ( "time" "android/soong/shared" "github.com/golang/protobuf/proto" smpb "android/soong/ui/metrics/metrics_proto" Loading Loading @@ -183,6 +184,17 @@ func NewConfig(ctx Context, args ...string) Config { "EMPTY_NINJA_FILE", ) if ret.UseGoma() { ctx.Println("Goma for Android is being deprecated and replaced with RBE. See go/rbe_for_android for instructions on how to use RBE.") ctx.Println() ctx.Println("See go/goma_android_exceptions for exceptions.") ctx.Fatalln("USE_GOMA flag is no longer supported.") } if ret.ForceUseGoma() { ret.environ.Set("USE_GOMA", "true") } // Tell python not to spam the source tree with .pyc files. ret.environ.Set("PYTHONDONTWRITEBYTECODE", "1") Loading Loading @@ -778,6 +790,18 @@ func (c *configImpl) TotalRAM() uint64 { return c.totalRAM } // ForceUseGoma determines whether we should override Goma deprecation // and use Goma for the current build or not. func (c *configImpl) ForceUseGoma() bool { if v, ok := c.environ.Get("FORCE_USE_GOMA"); ok { v = strings.TrimSpace(v) if v != "" && v != "false" { return true } } return false } func (c *configImpl) UseGoma() bool { if v, ok := c.environ.Get("USE_GOMA"); ok { v = strings.TrimSpace(v) Loading
ui/build/rbe.go +0 −10 Original line number Diff line number Diff line Loading @@ -151,13 +151,3 @@ 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, "") } }