Add LLVM_LIBC_CLANG_TIDY option and allow LLVM_LIBC_ENABLE_LINTING without full build.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libc/CMakeLists.txt | ||
---|---|---|
56 | Check whether that clang-tidy has the checks LLVM libc needs. This could be as simple as checking its version that it is good enough, and then matching it with the version of clang. | |
65 | Same thing here? | |
68 | 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? | |
libc/cmake/modules/LLVMLibCObjectRules.cmake | ||
282–283 | Why is this required? |
Add checks to make sure that clang-tidy is the same or newer than clang++ major version.
libc/CMakeLists.txt | ||
---|---|---|
68 | 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. | |
libc/cmake/modules/LLVMLibCObjectRules.cmake | ||
282–283 | 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. |
libc/CMakeLists.txt | ||
---|---|---|
75 | Should this be EQUAL instead of LESS? For, we want clang-tidy version to match the clang-version to avoid header-mismatches. | |
82–84 | The path to the clang-tidy binary can be set manually by passing -DLLVM_LIBC_CLANG_TIDY=<path/to/clang-tidy> to CMake. Similarly below as well. | |
88 | Because this is a FATAL_ERROR, do we really have to set LLVM_LIBC_ENABLE_LINTING to OFF? | |
libc/cmake/modules/LLVMLibCObjectRules.cmake | ||
230 | Why is this required? |
Check whether that clang-tidy has the checks LLVM libc needs. This could be as simple as checking its version that it is good enough, and then matching it with the version of clang.