diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2023-04-20 08:23:56 +0900 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2023-04-20 08:45:37 +0900 |
commit | 46f5aaa82ca6fe2a307504444754ac535fb4760d (patch) | |
tree | fc01f39bb4284fdda74f748140e591a912e937fe /utils | |
parent | c3368fbfe87e68c33887b56765fad5a5a0ceacee (diff) | |
download | llvm-46f5aaa82ca6fe2a307504444754ac535fb4760d.tar.gz |
[Bazel] Introduce "//clang:bundle_resources" for D146591
Diffstat (limited to 'utils')
-rw-r--r-- | utils/bazel/llvm-project-overlay/clang/BUILD.bazel | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/utils/bazel/llvm-project-overlay/clang/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang/BUILD.bazel index 2ecbe1822c19..7014b90f458e 100644 --- a/utils/bazel/llvm-project-overlay/clang/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/clang/BUILD.bazel @@ -406,6 +406,14 @@ genrule( cmd = "echo '#undef CLANG_REVISION' > $@", ) +py_binary( + name = "bundle_resources", + srcs = [ + "utils/bundle_resources.py", + ], + main = "utils/bundle_resources.py", +) + # A hacky library to expose some internal headers of the `basic` library to its # own implementation source files using a stripped include prefix rather than # file-relative-inclusion. This is inherently non-modular as these headers will @@ -817,6 +825,18 @@ cc_library( ], ) +genrule( + name = "HTMLLogger_gen", + outs = ["lib/Analysis/FlowSensitive/HTMLLogger.inc"], + srcs = [ + "lib/Analysis/FlowSensitive/HTMLLogger.html", + "lib/Analysis/FlowSensitive/HTMLLogger.css", + "lib/Analysis/FlowSensitive/HTMLLogger.js", + ], + tools = [":bundle_resources"], + cmd = "$(location :bundle_resources) $@ $(SRCS)", +) + cc_library( name = "analysis", srcs = glob([ @@ -824,15 +844,21 @@ cc_library( "lib/Analysis/FlowSensitive/*.cpp", "lib/Analysis/*.cpp", "lib/Analysis/*.h", - ]), + ]) + [ + "lib/Analysis/FlowSensitive/HTMLLogger.inc", + ], hdrs = glob([ "include/clang/Analysis/**/*.h", ]), - includes = ["include"], + includes = [ + "include", + "lib/Analysis/FlowSensitive", + ], textual_hdrs = glob([ "include/clang/Analysis/**/*.def", ]), deps = [ + ":HTMLLogger_gen", ":ast", ":ast_matchers", ":basic", |