xref: /aosp_15_r20/external/angle/build/config/siso/proto_linux.star (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1# -*- bazel-starlark -*-
2# Copyright 2023 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 proto/linux."""
6
7load("@builtin//path.star", "path")
8load("@builtin//struct.star", "module")
9load("./config.star", "config")
10
11def __filegroups(ctx):
12    return {}
13
14def __step_config(ctx, step_config):
15    remote_run = True  # Turn this to False when you do file access trace.
16    step_config["rules"].extend([
17        {
18            "name": "proto/protoc_wrapper",
19            "command_prefix": "python3 ../../tools/protoc_wrapper/protoc_wrapper.py",
20            "exclude_input_patterns": [
21                "*.o",
22                "*.a",
23                "*.h",
24                "*.cc",
25                # "*_pb2.py",
26            ],
27            # TODO(https://crrev.com/c/6057248): remove this after
28            # proto_library.gni change.
29            "inputs": [
30                "third_party/protobuf/src/google/protobuf/descriptor.proto",
31            ],
32            "remote": remote_run,
33            # chromeos generates default.profraw?
34            "ignore_extra_output_pattern": ".*default.profraw",
35            # "deps": "depfile",
36            "output_local": True,
37            "timeout": "2m",
38        },
39    ])
40    return step_config
41
42proto = module(
43    "proto",
44    step_config = __step_config,
45    filegroups = __filegroups,
46    handlers = {},
47)
48