[libcxx-commits] [PATCH] D141294: [libc++] Enable clang-tidy from the buildkite pipeline instead of hard-coding it in run-buildbot
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 9 09:32:26 PST 2023
ldionne requested changes to this revision.
ldionne added a comment.
This revision now requires changes to proceed.
Is there any reason why this diff doesn't work instead? This would cause `clang-tidy` tests to be enabled if and only if the right clang dev packages can be found without needing to pass anything explicitly. We should also have a way to ensure that those are enabled when running inside our Docker image, but that's a separate concern.
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index eb71ae89f9fa..454caedcdf3f 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -103,7 +103,6 @@ option(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS
to provide compile-time errors when using features unavailable on some version of
the shared library they shipped should turn this on and see `include/__availability`
for more details." OFF)
-option(LIBCXX_ENABLE_CLANG_TIDY "Whether to compile and run clang-tidy checks" OFF)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-shared-gcc.cfg.in")
@@ -929,10 +928,6 @@ if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)
list(APPEND LIBCXX_TEST_DEPS cxx_external_threads)
endif()
-if (LIBCXX_ENABLE_CLANG_TIDY)
- list(APPEND LIBCXX_TEST_DEPS cxx-tidy)
-endif()
-
if (LIBCXX_INCLUDE_BENCHMARKS)
add_subdirectory(benchmarks)
endif()
diff --git a/libcxx/test/tools/CMakeLists.txt b/libcxx/test/tools/CMakeLists.txt
index 10be63e8b50a..c0b21ef96a3c 100644
--- a/libcxx/test/tools/CMakeLists.txt
+++ b/libcxx/test/tools/CMakeLists.txt
@@ -1,7 +1,3 @@
set(LIBCXX_TEST_TOOLS_PATH ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)
-
-# TODO: Remove LIBCXX_ENABLE_CLANG_TIDY
-if(LIBCXX_ENABLE_CLANG_TIDY)
- add_subdirectory(clang_tidy_checks)
-endif()
+add_subdirectory(clang_tidy_checks)
diff --git a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
index 4599f5b80e59..cad42a14e541 100644
--- a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
+++ b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
@@ -40,3 +40,5 @@ set_target_properties(cxx-tidy PROPERTIES
set_target_properties(cxx-tidy PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set(CMAKE_SHARED_MODULE_SUFFIX_CXX .plugin) # Use a portable suffix to simplify how we can find it from Lit
+
+list(APPEND LIBCXX_TEST_DEPS cxx-tidy)
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 3ee025c19e06..0cc36b032c17 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -226,43 +226,37 @@ check-generated-output)
#
generic-cxx03)
clean
- generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx03.cmake" \
- -DLIBCXX_ENABLE_CLANG_TIDY=ON
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx03.cmake"
check-runtimes
check-abi-list
;;
generic-cxx11)
clean
- generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx11.cmake" \
- -DLIBCXX_ENABLE_CLANG_TIDY=ON
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx11.cmake"
check-runtimes
check-abi-list
;;
generic-cxx14)
clean
- generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx14.cmake" \
- -DLIBCXX_ENABLE_CLANG_TIDY=ON
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx14.cmake"
check-runtimes
check-abi-list
;;
generic-cxx17)
clean
- generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx17.cmake" \
- -DLIBCXX_ENABLE_CLANG_TIDY=ON
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx17.cmake"
check-runtimes
check-abi-list
;;
generic-cxx20)
clean
- generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx20.cmake" \
- -DLIBCXX_ENABLE_CLANG_TIDY=ON
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx20.cmake"
check-runtimes
check-abi-list
;;
generic-cxx2b)
clean
- generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx2b.cmake" \
- -DLIBCXX_ENABLE_CLANG_TIDY=ON
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx2b.cmake"
check-runtimes
check-abi-list
;;
@@ -420,8 +414,7 @@ generic-no-experimental)
;;
generic-noexceptions)
clean
- generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-noexceptions.cmake" \
- -DLIBCXX_ENABLE_CLANG_TIDY=ON
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-noexceptions.cmake"
check-runtimes
check-abi-list
;;
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141294/new/
https://reviews.llvm.org/D141294
More information about the libcxx-commits
mailing list