浏览代码

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>
Michael Savigny 4 年之前
父节点
当前提交
684460d29e
共有 2 个文件被更改,包括 12 次插入6 次删除
  1. 9 3
      autoninja.bat
  2. 3 3
      autoninja.py

+ 9 - 3
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
 )

+ 3 - 3
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))