Debian Codegraph @

utils/bazel/llvm-project-overlay/clang-tools-extra/clang-doc/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 = "clang-doc-support",
16 srcs = glob(["support/*.cpp"]),
17 hdrs = glob(["support/*.h"]),
18 deps = [
19 ":lib",
20 "//llvm:Support",
21 ],
22 )
23
24 cc_library(
25 name = "lib",
26 srcs = glob(
27 ["*.cpp"],
28 exclude = [
29 "Generators.cpp",
30 "HTMLGenerator.cpp",
31 "MDGenerator.cpp",
32 "YAMLGenerator.cpp",
33 ],
34 ),
35 hdrs = glob(["*.h"]),
36 includes = ["."],
37 deps = [
38 "//clang:ast",
39 "//clang:basic",
40 "//clang:frontend",
41 "//clang:index",
42 "//clang:lex",
43 "//clang:tooling",
44 "//llvm:BitstreamReader",
45 "//llvm:BitstreamWriter",
46 "//llvm:Support",
47 ],
48 )
49
50 cc_library(
51 name = "generators",
52 srcs = [
53 "Generators.cpp",
54 "HTMLGenerator.cpp",
55 "MDGenerator.cpp",
56 "YAMLGenerator.cpp",
57 ],
58 hdrs = ["Generators.h"],
59 includes = ["."],
60 deps = [
61 ":clang-doc-support",
62 ":lib",
63 "//clang:basic",
64 "//llvm:Support",
65 ],
66 )
67
68 filegroup(
69 name = "assets",
70 srcs = glob(["assets/**"]),
71 )
72
73 cc_binary(
74 name = "clang-doc",
75 srcs = ["tool/ClangDocMain.cpp"],
76 stamp = 0,
77 deps = [
78 ":clang-doc-support",
79 ":generators",
80 ":lib",
81 "//clang:ast",
82 "//clang:ast_matchers",
83 "//clang:basic",
84 "//clang:driver",
85 "//clang:frontend",
86 "//clang:tooling",
87 "//llvm:Support",
88 ],
89 )