| 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 = "lib", |
| 16 |
srcs = glob(["lib/**/*.cpp"]), |
| 17 |
hdrs = glob(["include/clang-apply-replacements/**/*.h"]), |
| 18 |
includes = ["include"], |
| 19 |
deps = [ |
| 20 |
"//clang:basic", |
| 21 |
"//clang:format", |
| 22 |
"//clang:lex", |
| 23 |
"//clang:rewrite", |
| 24 |
"//clang:tooling", |
| 25 |
"//clang:tooling_core", |
| 26 |
"//clang:tooling_refactoring", |
| 27 |
"//llvm:Support", |
| 28 |
], |
| 29 |
) |
| 30 |
|
| 31 |
cc_binary( |
| 32 |
name = "clang-apply-replacements", |
| 33 |
srcs = glob([ |
| 34 |
"tool/*.cpp", |
| 35 |
]), |
| 36 |
deps = [ |
| 37 |
":lib", |
| 38 |
"//clang:basic", |
| 39 |
"//clang:format", |
| 40 |
"//clang:rewrite", |
| 41 |
"//llvm:Support", |
| 42 |
], |
| 43 |
) |