Debian Codegraph @

utils/bazel/llvm-project-overlay/clang-tools-extra/include-cleaner/BUILD.bazel

raw
1 # This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2 # See https://llvm.org/LICENSE.txt for license information.
3 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5 load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
6
7 package(
8 default_visibility = ["//visibility:public"],
9 features = ["layering_check"],
10 )
11
12 licenses(["notice"])
13
14 cc_library(
15 name = "include_cleaner",
16 srcs = glob([
17 "lib/*.h",
18 "lib/*.cpp",
19 ]),
20 hdrs = glob(["include/clang-include-cleaner/*.h"]),
21 includes = ["include/"],
22 deps = [
23 "//clang:ast",
24 "//clang:basic",
25 "//clang:format",
26 "//clang:frontend",
27 "//clang:lex",
28 "//clang:tooling_core",
29 "//clang:tooling_inclusions",
30 "//llvm:Support",
31 ],
32 )
33
34 cc_library(
35 name = "include_cleaner_internal",
36 hdrs = glob(["lib/*.h"]),
37 includes = ["lib/"],
38 visibility = [":__subpackages__"],
39 deps = [
40 ":include_cleaner",
41 "//clang:ast",
42 "//clang:basic",
43 "//clang:frontend",
44 "//clang:lex",
45 "//clang:tooling_inclusions",
46 "//llvm:Support",
47 ],
48 )
49
50 cc_binary(
51 name = "clang-include-cleaner",
52 srcs = glob([
53 "tool/*.cpp",
54 ]),
55 deps = [
56 ":include_cleaner",
57 ":include_cleaner_internal",
58 "//clang:frontend",
59 "//clang:lex",
60 "//clang:tooling",
61 "//llvm:Support",
62 ],
63 )