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