build: disable typecheck for analyzers and Fil-C

- cmake: automatically disable typecheck when running clang-tidy,
  to avoid possible interference, and to improve performance.

- INSTALL-CMAKE: document both this, and unity=off for clang-tidy.

- GHA/linux: disable for some static analyzers CI jobs to avoid possible
  interference.

- GHA/linux: disable in Fil-C job to improve build performance.

Follow-up to 9e6f1c5efb #19637
Follow-up to fd2ca2399e #17955

Closes #19941
This commit is contained in:
Viktor Szakats 2025-12-12 01:05:21 +01:00
parent 3f1cd809ee
commit e413a38190
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
3 changed files with 6 additions and 4 deletions

View file

@ -266,6 +266,7 @@ endif()
option(CURL_CLANG_TIDY "Run the build through clang-tidy" OFF)
if(CURL_CLANG_TIDY)
set(CMAKE_UNITY_BUILD OFF) # clang-tidy is not looking into #included sources, thus not compatible with unity builds.
set(CURL_DISABLE_TYPECHECK ON) # to improve performance and avoid potential interference.
set(_tidy_checks "")
list(APPEND _tidy_checks "-clang-analyzer-security.insecureAPI.bzero") # for FD_ZERO() (seen on macOS)
list(APPEND _tidy_checks "-clang-analyzer-security.insecureAPI.strcpy")