• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# -*- bazel-starlark -*-
2# Copyright 2024 The Chromium Authors
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5"""Siso configuration for V8 builds."""
6
7load("@builtin//lib/gn.star", "gn")
8load("@builtin//struct.star", "module")
9load("./platform.star", "platform")
10
11def __step_config(ctx, step_config):
12    remote_run = True  # Turn this to False when you do file access trace.
13    if "args.gn" in ctx.metadata:
14        gn_args = gn.args(ctx)
15        if gn_args.get("target_cpu", "").strip('"') == "x86":
16            # RBE doesn't support ELF32
17            remote_run = False
18    step_config["rules"].extend([
19        {
20            "name": "v8/torque",
21            "command_prefix": platform.python_bin + " ../../v8/tools/run.py ./torque",
22            "remote": remote_run,
23            "timeout": "2m",
24        },
25        {
26            "name": "v8/mksnapshot",
27            "command_prefix": platform.python_bin + " ../../v8/tools/run.py ./mksnapshot",
28            "remote": remote_run,
29            "timeout": "2m",
30            # This action may consume a lot of memory on sanitizer builders.
31            # 49s on n2-custom-3840-2 -> 32s on n2-highmem-8
32            "platform_ref": "large",
33            # The outputs of mksnapshot are often required for running the
34            # following steps.
35            "output_local": True,
36        },
37    ])
38    return step_config
39
40v8 = module(
41    "v8",
42    step_config = __step_config,
43)
44