1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
build / config / siso / clang_all.star [blame]
# -*- bazel-starlark -*-
# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Siso configuration for clang."""
load("@builtin//struct.star", "module")
load("./mac_sdk.star", "mac_sdk")
load("./win_sdk.star", "win_sdk")
def __filegroups(ctx):
fg = {
"third_party/libc++/src/include:headers": {
"type": "glob",
"includes": ["*"],
# can't use "*.h", because c++ headers have no extension.
},
"third_party/libc++abi/src/include:headers": {
"type": "glob",
"includes": ["*.h"],
},
# vendor provided headers for libc++.
"buildtools/third_party/libc++:headers": {
"type": "glob",
"includes": [
"__*",
],
},
# toolchain root
# :headers for compiling
"third_party/llvm-build/Release+Asserts:headers": {
"type": "glob",
"includes": [
"*.h",
"bin/clang",
"bin/clang++",
"bin/clang-cl",
"bin/clang-cl.exe",
"*_ignorelist.txt",
# https://crbug.com/335997052
"clang_rt.profile*.lib",
],
},
"third_party/cronet_android_mainline_clang/linux-amd64:headers": {
"type": "glob",
"includes": [
"*.h",
"bin/clang*",
],
},
"third_party/cronet_android_mainline_clang/linux-amd64:link": {
"type": "glob",
"includes": [
"bin/clang*",
"bin/ld.lld",
"bin/lld",
"bin/llvm-nm",
"bin/llvm-objcopy",
"bin/llvm-readelf",
"bin/llvm-readobj",
"bin/llvm-strip",
"*.so",
"*.so.*",
"*.a",
],
},
}
if win_sdk.enabled(ctx):
fg.update(win_sdk.filegroups(ctx))
if mac_sdk.enabled(ctx):
fg.update(mac_sdk.filegroups(ctx))
return fg
__input_deps = {
# need this because we use
# third_party/libc++/src/include:headers,
# but scandeps doesn't scan `__config` file, which uses
# `#include <__config_site>`
# also need `__assertion_handler`. b/321171148
"third_party/libc++/src/include": [
"buildtools/third_party/libc++:headers",
],
"third_party/llvm-build/Release+Asserts/bin/clang": [
"build/config/unsafe_buffers_paths.txt",
],
"third_party/llvm-build/Release+Asserts/bin/clang++": [
"build/config/unsafe_buffers_paths.txt",
],
"third_party/llvm-build/Release+Asserts/bin/clang-cl": [
"build/config/unsafe_buffers_paths.txt",
],
"third_party/llvm-build/Release+Asserts/bin/clang-cl.exe": [
"build/config/unsafe_buffers_paths.txt",
],
"build/toolchain/gcc_solink_wrapper.py": [
"build/toolchain/whole_archive.py",
"build/toolchain/wrapper_utils.py",
],
"build/toolchain/gcc_solink_wrapper.py:link": [
"build/toolchain/gcc_solink_wrapper.py",
"build/toolchain/whole_archive.py",
"build/toolchain/wrapper_utils.py",
],
"build/toolchain/gcc_link_wrapper.py": [
"build/toolchain/whole_archive.py",
"build/toolchain/wrapper_utils.py",
],
"build/toolchain/gcc_link_wrapper.py:link": [
"build/toolchain/gcc_link_wrapper.py",
"build/toolchain/whole_archive.py",
"build/toolchain/wrapper_utils.py",
],
"build/toolchain/apple/linker_driver.py:link": [
"build/toolchain/apple/linker_driver.py",
"build/toolchain/whole_archive.py",
],
"build/toolchain/apple/solink_driver.py:link": [
"build/toolchain/apple/linker_driver.py",
"build/toolchain/apple/solink_driver.py",
"build/toolchain/whole_archive.py",
],
}
clang_all = module(
"clang_all",
filegroups = __filegroups,
input_deps = __input_deps,
)