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 <dpranke@google.com>
Commit-Queue: Michael Savigny <msavigny@google.com>
diff --git a/autoninja.bat b/autoninja.bat
index 5dee6de..c504f38 100755
--- a/autoninja.bat
+++ b/autoninja.bat
@@ -18,9 +18,15 @@
 
 :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 a0f4996..a19d08f 100755
--- a/autoninja.py
+++ b/autoninja.py
@@ -161,9 +161,9 @@
   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))