From 684460d29eb48bb46cb139dde4c6f6e39c3266be Mon Sep 17 00:00:00 2001 From: Michael Savigny Date: Tue, 1 Dec 2020 19:39:52 +0000 Subject: [PATCH] Add remote-disabled support for reclient in autoninja. In addition to setting GOMA_DISABLED, this CL also sets the RBE_remote_disabled environment variable to autoninja. Bug: 1149386 Change-Id: I9aa8be005a9cd473b7371eadcab83d6068e0e070 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2565550 Reviewed-by: Dirk Pranke Commit-Queue: Michael Savigny --- autoninja.bat | 12 +++++++++--- autoninja.py | 6 +++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/autoninja.bat b/autoninja.bat index 5dee6de849..c504f38c41 100755 --- a/autoninja.bat +++ b/autoninja.bat @@ -18,9 +18,15 @@ set scriptdir=%~dp0 :loop IF NOT "%1"=="" ( - @rem Tell goma to not do network compiles. - IF "%1"=="--offline" SET GOMA_DISABLED=1 - IF "%1"=="-o" SET GOMA_DISABLED=1 + @rem Tell goma or reclient to not do network compiles. + IF "%1"=="--offline" ( + SET GOMA_DISABLED=1 + SET RBE_remote_disabled=1 + ) + IF "%1"=="-o" ( + SET GOMA_DISABLED=1 + SET RBE_remote_disabled=1 + ) SHIFT GOTO :loop ) diff --git a/autoninja.py b/autoninja.py index a0f49966bf..a19d08f182 100755 --- a/autoninja.py +++ b/autoninja.py @@ -161,9 +161,9 @@ if os.environ.get('NINJA_SUMMARIZE_BUILD', '0') == '1': args += ['-d', 'stats'] if offline and not sys.platform.startswith('win'): - # Tell goma to do local compiles. On Windows this environment variable is set - # by the wrapper batch file. - print('GOMA_DISABLED=1 ' + ' '.join(args)) + # Tell goma or reclient to do local compiles. On Windows these environment + # variables are set by the wrapper batch file. + print('RBE_remote_disabled=1 GOMA_DISABLED=1 ' + ' '.join(args)) else: print(' '.join(args))