xref: /aosp_15_r20/external/angle/build/config/siso/nasm_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 nasm/linux."""
6
7load("@builtin//path.star", "path")
8load("@builtin//struct.star", "module")
9
10def __filegroups(ctx):
11    return {}
12
13__handlers = {}
14
15def __step_config(ctx, step_config):
16    remote_run = True  # Turn this to False when you do file access trace.
17    rules = []
18    for toolchain in ["", "clang_x64"]:
19        nasm_path = path.join(toolchain, "nasm")
20        rules.append({
21            "name": path.join("nasm", toolchain),
22            "command_prefix": "python3 ../../build/gn_run_binary.py " + nasm_path,
23            "exclude_input_patterns": [
24                "*.stamp",
25            ],
26            "remote": remote_run,
27            # chromeos generates default.profraw?
28            "ignore_extra_output_pattern": ".*default.profraw",
29            "timeout": "2m",
30        })
31    step_config["rules"].extend(rules)
32    return step_config
33
34nasm = module(
35    "nasm",
36    step_config = __step_config,
37    filegroups = __filegroups,
38    handlers = __handlers,
39)
40