]> git.feebdaed.xyz Git - 0xmirror/curl.git/commit
build: add build-level `CURL_DISABLE_TYPECHECK` options
authorViktor Szakats <commit@vsz.me>
Fri, 21 Nov 2025 11:43:54 +0000 (12:43 +0100)
committerViktor Szakats <commit@vsz.me>
Fri, 21 Nov 2025 12:48:35 +0000 (13:48 +0100)
commit9e6f1c5efb7a70e1f33e467a738f3e3f652f3174
treec70f1ca2805e19ec56fd33703d2bd180d69c3774
parenteaa7651374898cef89e5783b0219bdffcc0eb60e
build: add build-level `CURL_DISABLE_TYPECHECK` options

Usage:
- autotools: `--disable-typecheck` (or `--enable-typecheck` (default))
- cmake: `-DCURL_DISABLE_TYPECHECK=ON`.

To disable `curl_easy_setopt()`/`curl_easy_getinfo()` type checking with
supported (new) gcc and clang compilers. It is useful to improve build
performance for the `tests/libtest` target. In particular the CodeQL
analyzer may take above an hour to compile with type checking enabled,
and disabling it brings it down to seconds. On local machines it may
also cut build times in half when build testdeps, depending on platform
and compiler.

Other than these cases, we recommend leaving type checking enabled.

Ref: fdacf34aaeac79ad14fa48dcafae24a6de68823d #19632

Also:
- GHA/codeql: use it.
- test1165: check in `include/curl`.
- lib1912: delete stray todo comment.
- spelling and comment nits.

Closes #19637
.github/workflows/codeql.yml
CMakeLists.txt
configure.ac
docs/CURL-DISABLE.md
docs/INSTALL-CMAKE.md
include/curl/typecheck-gcc.h
lib/curl_config.h.cmake
tests/libtest/lib1912.c
tests/test1165.pl