• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 clang."""
6
7load("@builtin//struct.star", "module")
8
9def __filegroups(ctx):
10    return {
11        "third_party/libc++/src/include:headers": {
12            "type": "glob",
13            "includes": ["*"],
14            # can't use "*.h", because c++ headers have no extension.
15        },
16        "third_party/libc++abi/src/include:headers": {
17            "type": "glob",
18            "includes": ["*.h"],
19        },
20
21        # toolchain root
22        # :headers for compiling
23        "third_party/llvm-build/Release+Asserts:headers": {
24            "type": "glob",
25            "includes": [
26                "*.h",
27                "bin/clang",
28                "bin/clang++",
29                "bin/clang-cl.exe",
30            ],
31        },
32    }
33
34__input_deps = {
35    # need this because we use
36    # third_party/libc++/src/include:headers,
37    # but scandeps doesn't scan `__config` file, which uses
38    # `#include <__config_site>`
39    "third_party/libc++/src/include": [
40        "buildtools/third_party/libc++/__config_site",
41    ],
42}
43
44clang_all = module(
45    "clang_all",
46    filegroups = __filegroups,
47    input_deps = __input_deps,
48)
49