Skip to content

build: do not apply curl debug macros to tests/server by default #16705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Mar 13, 2025

It seems unnecessary and possibly unexpected to build test servers with
debug-enabled features and memory tracking whenever the tested curl is
built like that (which is a requirement for some tests, so curl is
mostly built like that when running tests.) It also makes building
servers a little bit faster with cmake for the most common cases.

You can apply debug options to tests/server with these new options:

  • ./configure: --enable-server-debug.
  • cmake: -DENABLE_SERVER_DEBUG.

Also sync the way we pass these macros in autotools, with CMake builds.
Before this patch, autotools passed them via curl_config.h. After this
patch it passes them on the command-line, like cmake builds do.

This patch also make these option no longer passed to examples and
http/client in cmake builds, where they were no-ops anyway.

Ref: #15000


This also syncs passing these macros with CMake builds. Before this
patch, autotools passed them via `curl_config.h`. After this patch
it passed on the command-line, like in CMake builds.
@vszakats vszakats force-pushed the dis-debug-for-servers branch from 17d0363 to d219e3c Compare March 14, 2025 11:38
@vszakats vszakats closed this in a16485a Mar 14, 2025
@vszakats vszakats deleted the dis-debug-for-servers branch March 14, 2025 12:00
vszakats added a commit that referenced this pull request Mar 14, 2025
Before this patch, autotools builds excluded TrackMemory sources
(`lib/memdebug.c` and `lib/curl_multibyte.c`) based on the `DEBUGBUILD`
setting. This works in most cases because its value is the same as
`CURLDEBUG` by default, but the correct condition is `CURLDEBUG`.

It should fix `--disable-debug --enable-curldebug --enable-unity`
builds. (not tested in CI)

It also syncs behavior with cmake builds.

Ref: #16705
Closes #16723
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant