• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# -*- bazel-starlark -*-
2# Copyright 2023 The Chromium Authors. All rights reserved.
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
9__filegroups = {
10    # TODO: remove buildtools/third_party/lib* once migrated to third_party/lib*
11    "buildtools/third_party/libc++/trunk/include:headers": {
12        "type": "glob",
13        "includes": ["*"],
14        # can't use "*.h", because c++ headers have no extension.
15    },
16    "buildtools/third_party/libc++abi/trunk/include:headers": {
17        "type": "glob",
18        "includes": ["*.h"],
19    },
20    "third_party/libc++/trunk/include:headers": {
21        "type": "glob",
22        "includes": ["*"],
23        # can't use "*.h", because c++ headers have no extension.
24    },
25    "third_party/libc++abi/trunk/include:headers": {
26        "type": "glob",
27        "includes": ["*.h"],
28    },
29
30    # toolchain root
31    # :headers for compiling
32    "third_party/llvm-build/Release+Asserts:headers": {
33        "type": "glob",
34        "includes": [
35            "*.h",
36            "bin/clang",
37            "bin/clang++",
38            "bin/clang-cl.exe",
39        ],
40    },
41}
42
43__input_deps = {
44    # need this because we use
45    # buildtools/third_party/libc++/trunk/include:headers,
46    # but scandeps doesn't scan `__config` file, which uses
47    # `#include <__config_site>`
48    # TODO: remove buildtools/third_party/lib* once migrated to third_party/lib*
49    "buildtools/third_party/libc++": [
50        "buildtools/third_party/libc++/__config_site",
51    ],
52    "third_party/libc++": [
53        "buildtools/third_party/libc++/__config_site",
54    ],
55}
56
57clang_all = module(
58    "clang_all",
59    filegroups = __filegroups,
60    input_deps = __input_deps,
61)
62