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 # vendor provided headers for libc++. 21 "buildtools/third_party/libc++:headers": { 22 "type": "glob", 23 "includes": ["__*"], 24 }, 25 26 # toolchain root 27 # :headers for compiling 28 "third_party/llvm-build/Release+Asserts:headers": { 29 "type": "glob", 30 "includes": [ 31 "*.h", 32 "bin/clang", 33 "bin/clang++", 34 "bin/clang-cl.exe", 35 "*_ignorelist.txt", 36 # https://crbug.com/335997052 37 "clang_rt.profile*.lib", 38 ], 39 }, 40 } 41 42__input_deps = { 43 # need this because we use 44 # third_party/libc++/src/include:headers, 45 # but scandeps doesn't scan `__config` file, which uses 46 # `#include <__config_site>` 47 # also need `__assertion_handler`. b/321171148 48 "third_party/libc++/src/include": [ 49 "buildtools/third_party/libc++:headers", 50 ], 51 "third_party/llvm-build/Release+Asserts/bin/clang": [ 52 "build/config/unsafe_buffers_paths.txt", 53 ], 54 "third_party/llvm-build/Release+Asserts/bin/clang++": [ 55 "build/config/unsafe_buffers_paths.txt", 56 ], 57 "third_party/llvm-build/Release+Asserts/bin/clang-cl": [ 58 "build/config/unsafe_buffers_paths.txt", 59 ], 60 "third_party/llvm-build/Release+Asserts/bin/clang-cl.exe": [ 61 "build/config/unsafe_buffers_paths.txt", 62 ], 63} 64 65clang_all = module( 66 "clang_all", 67 filegroups = __filegroups, 68 input_deps = __input_deps, 69) 70