From f26dddb20468d873885432de600d2918c09d086e Mon Sep 17 00:00:00 2001 From: Michael Savigny Date: Thu, 14 Dec 2023 19:06:29 +0000 Subject: [PATCH] Add use_goma deprecation warning to autoninja. Adds the same warning to every use_goma build that is currently printed on a gn gen with use_goma=true. Bug:b/277197166 Change-Id: Icf9781f814416dfbeb2826fc88372465155fcd2b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5123231 Reviewed-by: Gavin Mak Commit-Queue: Michael Savigny --- autoninja.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/autoninja.py b/autoninja.py index 253f2847b..a55768fee 100755 --- a/autoninja.py +++ b/autoninja.py @@ -353,6 +353,35 @@ def main(args): # script. print("false") sys.exit(1) + # Display a warning that goma is being deprecated, every time a build + # is executed with 'use_goma. + # Further changes to encourage switching may follow. + if sys.platform.startswith("win"): + print( + "The gn arg use_goma=true will be deprecated by EOY 2023. " + "Please use `use_remoteexec=true` instead. See " + "https://chromium.googlesource.com/chromium/src/+/main/docs/" + "windows_build_instructions.md#use-reclient " + "for setup instructions.", + file=sys.stderr, + ) + elif sys.platform == "darwin": + print( + "The gn arg use_goma=true will be deprecated by EOY 2023. " + "Please use `use_remoteexec=true` instead. " + "If you are a googler see http://go/building-chrome-mac" + "#using-remote-execution for setup instructions.", + file=sys.stderr, + ) + else: + print( + "The gn arg use_goma=true will be deprecated by EOY 2023. " + "Please use `use_remoteexec=true` instead. See " + "https://chromium.googlesource.com/chromium/src/+/main/docs/" + "linux/build_instructions.md#use-reclient for setup instructions.", + file=sys.stderr, + ) + # A large build (with or without goma) tends to hog all system resources. # Depending on the operating system, we might have mechanisms available