record use_remoteexec and use_reclient in gn_logs.txt
Siso will read gn_logs.txt to check use_reclient instead of reading args.gn to work with use_reclient default value change. Should be no behavior change. Bug: 341167943 Change-Id: I0ba6c30e458534017bf7f7073d62e0dd86c78602 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6048107 Auto-Submit: Fumitoshi Ukai <ukai@google.com> Reviewed-by: Junji Watanabe <jwata@google.com> Commit-Queue: Fumitoshi Ukai <ukai@google.com> Cr-Commit-Position: refs/heads/main@{#1388606}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
470c4f81ba
commit
db8416b6ea
build
@ -11,6 +11,7 @@ load("./clang_all.star", "clang_all")
|
||||
load("./clang_code_coverage_wrapper.star", "clang_code_coverage_wrapper")
|
||||
load("./config.star", "config")
|
||||
load("./gn_logs.star", "gn_logs")
|
||||
load("./reproxy.star", "reproxy")
|
||||
load("./rewrapper_cfg.star", "rewrapper_cfg")
|
||||
load("./win_sdk.star", "win_sdk")
|
||||
|
||||
@ -72,7 +73,7 @@ def __step_config(ctx, step_config):
|
||||
canonicalize_dir = not input_root_absolute_path
|
||||
|
||||
timeout = "2m"
|
||||
if gn.args(ctx).get("use_reclient") == "false" and windowsWorker:
|
||||
if (not reproxy.enabled(ctx)) and windowsWorker:
|
||||
# use longer timeout for siso native
|
||||
# it takes long time for input fetch (many files in sysroot etc)
|
||||
timeout = "4m"
|
||||
|
@ -5,12 +5,12 @@
|
||||
"""Siso configuration for rewriting remote calls into reproxy config."""
|
||||
|
||||
load("@builtin//encoding.star", "json")
|
||||
load("@builtin//lib/gn.star", "gn")
|
||||
load("@builtin//path.star", "path")
|
||||
load("@builtin//runtime.star", "runtime")
|
||||
load("@builtin//struct.star", "module")
|
||||
load("./clang_code_coverage_wrapper.star", "clang_code_coverage_wrapper")
|
||||
load("./config.star", "config")
|
||||
load("./gn_logs.star", "gn_logs")
|
||||
load("./platform.star", "platform")
|
||||
load("./rewrapper_cfg.star", "rewrapper_cfg")
|
||||
|
||||
@ -241,17 +241,7 @@ __handlers = {
|
||||
}
|
||||
|
||||
def __use_reclient(ctx):
|
||||
use_remoteexec = False
|
||||
use_reclient = None
|
||||
if "args.gn" in ctx.metadata:
|
||||
gn_args = gn.args(ctx)
|
||||
if gn_args.get("use_remoteexec") == "true":
|
||||
use_remoteexec = True
|
||||
if gn_args.get("use_reclient") == "false":
|
||||
use_reclient = False
|
||||
if use_reclient == None:
|
||||
use_reclient = use_remoteexec
|
||||
return use_reclient
|
||||
return gn_logs.read(ctx).get("use_reclient") == "true"
|
||||
|
||||
def __step_config(ctx, step_config):
|
||||
# New rules to convert commands calling rewrapper to use reproxy instead.
|
||||
|
@ -4,9 +4,13 @@
|
||||
|
||||
import("//build/config/compiler/compiler.gni")
|
||||
import("//build/toolchain/concurrent_links.gni")
|
||||
import("//build/toolchain/rbe.gni")
|
||||
|
||||
build_gn_logs = [ "### rbe.gni ###" ] + rbe_logs
|
||||
build_gn_logs += [ "" ]
|
||||
|
||||
# Log lines for gn_logs.txt that originate from within //build.
|
||||
build_gn_logs = [ "### compiler.gni ###" ] + compiler_logs
|
||||
build_gn_logs += [ "### compiler.gni ###" ] + compiler_logs
|
||||
build_gn_logs += [ "" ]
|
||||
|
||||
if (target_os == "ios") {
|
||||
|
@ -26,7 +26,9 @@ declare_args() {
|
||||
|
||||
declare_args() {
|
||||
# Use Reclient as the RBE client by default.
|
||||
# Set to true to use re-client.
|
||||
# Set to false to use Siso's builtin RBE client.
|
||||
# TODO(crbug.com/341167943): make default false if use_siso=true
|
||||
use_reclient = use_remoteexec
|
||||
|
||||
# The directory where the re-client tooling binaries are.
|
||||
@ -57,6 +59,18 @@ if (use_reclient) {
|
||||
assert(use_remoteexec, "Can't enable Reclient when use_remoteexec is false")
|
||||
}
|
||||
|
||||
if (use_remoteexec) {
|
||||
rbe_logs = [ "use_remoteexec=true" ]
|
||||
} else {
|
||||
rbe_logs = [ "use_remoteexec=false" ]
|
||||
}
|
||||
|
||||
if (use_reclient) {
|
||||
rbe_logs += [ "use_reclient=true" ]
|
||||
} else {
|
||||
rbe_logs += [ "use_reclient=false" ]
|
||||
}
|
||||
|
||||
# Siso native also uses rewrapper cfg file
|
||||
# to get remote platform property.
|
||||
use_reclient_cfgs =
|
||||
|
Reference in New Issue
Block a user