[clang-tools-extra] [clang-doc] Cleanup CMake files and ensure benchmarks build (PR #185469)
Paul Kirth via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 9 10:31:47 PDT 2026
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/185469
There's some poor formatting, and ClangDocBenchmark references several
targets that are required, but only because they're required for
clang-doc itself. We can just get those requirements from the clangDoc
target.
Additionally, we can make sure the benchmark builds as part of testing
when LLVM_INCLUDE_BENCHMARKS is set.
>From 4e26602cd8d15145aafc6c008fcba81c5e75d610 Mon Sep 17 00:00:00 2001
From: Paul Kirth <paulkirth at google.com>
Date: Mon, 9 Mar 2026 09:45:20 -0700
Subject: [PATCH] [clang-doc] Cleanup CMake files and ensure benchmarks build
There's some poor formatting, and ClangDocBenchmark references several
targets that are required, but only because they're required for
clang-doc itself. We can just get those requirements from the clangDoc
target.
Additionally, we can make sure the benchmark builds as part of testing
when LLVM_INCLUDE_BENCHMARKS is set.
---
clang-tools-extra/clang-doc/CMakeLists.txt | 2 +-
clang-tools-extra/clang-doc/benchmarks/CMakeLists.txt | 5 -----
clang-tools-extra/test/clang-doc/CMakeLists.txt | 4 ++++
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/clang-tools-extra/clang-doc/CMakeLists.txt b/clang-tools-extra/clang-doc/CMakeLists.txt
index 840449ce7b366..5f248feeac63d 100644
--- a/clang-tools-extra/clang-doc/CMakeLists.txt
+++ b/clang-tools-extra/clang-doc/CMakeLists.txt
@@ -40,7 +40,7 @@ clang_target_link_libraries(clangDoc
target_link_libraries(clangDoc
PRIVATE
- clangDocSupport
+ clangDocSupport
)
add_subdirectory(tool)
diff --git a/clang-tools-extra/clang-doc/benchmarks/CMakeLists.txt b/clang-tools-extra/clang-doc/benchmarks/CMakeLists.txt
index 055d443c38e31..9377fe41b4b27 100644
--- a/clang-tools-extra/clang-doc/benchmarks/CMakeLists.txt
+++ b/clang-tools-extra/clang-doc/benchmarks/CMakeLists.txt
@@ -12,9 +12,4 @@ target_include_directories(ClangDocBenchmark
target_link_libraries(ClangDocBenchmark
PRIVATE
clangDoc
- clangTooling
- clangBasic
- clangAST
- clangFrontend
- clangSerialization
)
diff --git a/clang-tools-extra/test/clang-doc/CMakeLists.txt b/clang-tools-extra/test/clang-doc/CMakeLists.txt
index 4446b2a3c897f..a6fb01aee7638 100644
--- a/clang-tools-extra/test/clang-doc/CMakeLists.txt
+++ b/clang-tools-extra/test/clang-doc/CMakeLists.txt
@@ -5,3 +5,7 @@ add_lit_testsuite(check-clang-extra-clang-doc "Running clang-doc tests"
DEPENDS clang-doc
DEPENDS ${LLVM_UTILS_DEPS}
)
+
+if (LLVM_INCLUDE_BENCHMARKS)
+ add_dependencies(check-clang-extra-clang-doc ClangDocBenchmark)
+endif()
More information about the cfe-commits
mailing list