From f8b6e1faa913748695fa920a6d4d91f780c291f8 Mon Sep 17 00:00:00 2001 From: Geoffrey Martin-Noble Date: Thu, 5 Aug 2021 10:59:40 -0700 Subject: [PATCH] [Bazel] Update for 9854f2f30f (Diff library) Updates the Bazel build for https://github.com/llvm/llvm-project/commit/9854f2f30f by extracting a library from llvm-diff. Note that this does not include the new llvm-livepatch binary, for which the CMake file was added accidentally and reverted in https://github.com/llvm/llvm-project/commit/fec8f1a008. Differential Revision: https://reviews.llvm.org/D107586 --- utils/bazel/llvm-project-overlay/llvm/BUILD.bazel | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel index 7fe3a126fb0e..a878c311d242 100644 --- a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel @@ -2457,7 +2457,6 @@ cc_library( "tools/llvm-exegesis/lib/*.cpp", "tools/llvm-exegesis/lib/X86/*.cpp", "tools/llvm-exegesis/lib/X86/*.h", - # We have to include these headers here as well as in the `hdrs` below # to allow the `.cpp` files to use file-relative-inclusion to find # them, even though consumers of this library use inclusion relative to @@ -3831,6 +3830,17 @@ cc_library( ], ) +cc_library( + name = "Diff", + testonly = True, + srcs = glob(["tools/llvm-diff/lib/*.cpp"]), + hdrs = glob(["tools/llvm-diff/lib/*.h"]), + deps = [ + ":Core", + ":Support", + ], +) + # A hacky library to expose some internal headers of gtest to its own # implementation source files using a stripped include prefix rather than # file-relative-inclusion. @@ -4072,9 +4082,8 @@ cc_binary( copts = llvm_copts, stamp = 0, deps = [ - ":AsmParser", - ":BitReader", ":Core", + ":Diff", ":IRReader", ":Support", ],