From 1f6ef165b726ed7316b8e88666390e90a82e8e50 Mon Sep 17 00:00:00 2001 From: Fumitoshi Ukai Date: Tue, 27 Aug 2024 22:36:43 +0000 Subject: [PATCH] autoninja: show warning if siso builtin remote exec is not used on cog If user forgets to set `use_reclient=false`, ``` ukai@ukai /google/cog/cloud/ukai/siso-test/chromium % ~/depot_tools/autoninja -C out/Default base WARNING: You're not using Siso's built-in remote execution. The build will be slow. You should set the following in args.gn to get better performance: use_remoteexec=true use_reclient=false use_siso=true Proxy started successfully. ``` Bug: b/362301140 Change-Id: I40972b96fd2576c32232f88e6248a1000708c3e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5816108 Reviewed-by: Junji Watanabe Auto-Submit: Fumitoshi Ukai Commit-Queue: Fumitoshi Ukai Reviewed-by: Gary Tong Reviewed-by: Takuto Ikuta Reviewed-by: Philipp Wollermann --- autoninja.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/autoninja.py b/autoninja.py index cdf263c7c..0d1c4cf05 100755 --- a/autoninja.py +++ b/autoninja.py @@ -33,6 +33,7 @@ import google.auth from google.auth.transport.requests import AuthorizedSession import build_telemetry +import gclient_utils import gn_helper import ninja import ninjalog_uploader @@ -272,6 +273,19 @@ def _main_inner(input_args, build_id, should_collect_logs=False): ) return 1 + if gclient_utils.IsEnvCog(): + if not use_remoteexec or use_reclient or not use_siso: + print( + "WARNING: You're not using Siso's built-in remote " + "execution. The build will be slow.\n" + "You should set the following in args.gn to get better " + "performance:\n" + " use_remoteexec=true\n" + " use_reclient=false\n" + " use_siso=true\n", + file=sys.stderr, + ) + siso_marker = os.path.join(output_dir, ".siso_deps") if use_siso: # siso generates a .ninja_log file so the mere existence of a