[libc-commits] [PATCH] D119180: [libc] Add LLVM_LIBC_CLANG_TIDY option and allow LLVM_LIBC_ENABLE_LINTING without full build.
Tue Ly via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Feb 14 08:35:59 PST 2022
lntue added inline comments.
================
Comment at: libc/CMakeLists.txt:64
+
+ if (NOT LLVM_LIBC_CLANG_TIDY)
+ if (LLVM_LIBC_FULL_BUILD
----------------
sivachandra wrote:
> We should probably not have this fallback at all? For, there is no guarantee that the compilers are in sync with the HEAD clang-tidy?
I was trying to preserve the current behavior of using the HEAD clang-tidy when the new flag is not set, so that it won't break all current bots that do not have clang-tidy installed after submission.
================
Comment at: libc/cmake/modules/LLVMLibCObjectRules.cmake:274
- add_custom_target(${fq_target_name}.__lint__
- DEPENDS ${lint_timestamp})
- add_dependencies(lint-libc ${fq_target_name}.__lint__)
- add_dependencies(${fq_target_name} ${fq_target_name}.__lint__)
+ if(NOT LLVM_LIBC_CLANG_TIDY)
+ add_custom_target(${fq_target_name}.__lint__
----------------
sivachandra wrote:
> Why is this required?
These dependencies are only needed for current behavior when clang-tidy is built in full build mode. If clang-tidy command is provided, we don't need these dependencies. Moreover, it might fail the build if these targets are not enabled with LLVM_ENABLE_PROJECTS.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119180/new/
https://reviews.llvm.org/D119180
More information about the libc-commits
mailing list