]> git.ipfire.org Git - thirdparty/curl.git/commit
cmake: fix unity with Windows Unicode + TrackMemory
authorViktor Szakats <commit@vsz.me>
Tue, 3 Oct 2023 02:27:05 +0000 (02:27 +0000)
committerViktor Szakats <commit@vsz.me>
Tue, 3 Oct 2023 09:43:46 +0000 (09:43 +0000)
commitf42a279ee32d3db3ab529da8dfb833edb5a088ca
tree344501eb31c6d4f76010c8545e597a46c7cafc4a
parentd82b080f6374433ce7c98241329189ad2d3976f8
cmake: fix unity with Windows Unicode + TrackMemory

Found the root cause of the startup crash in unity builds with Unicode
and TrackMemory enabled at the same time.

We must make sure that the `memdebug.h` header doesn't apply to
`lib/curl_multibyte.c` (as even noted in a comment there.) In unity
builds all headers apply to all sources, including `curl_multibyte.c`.
This probably resulted in an infinite loop on startup.

Exclude this source from unity compilation with TrackMemory enabled,
in both libcurl and curl tool. Enable unity mode for a debug Unicode
CI job to keep it tested. Also delete the earlier workaround that
fully disabled unity for affected builds.

Follow-up to d82b080f6374433ce7c98241329189ad2d3976f8 #12005
Follow-up to 3f8fc25720900b14b7432f4bd93407ca15311719 #11095

Closes #11928
CMakeLists.txt
appveyor.yml
lib/CMakeLists.txt
src/CMakeLists.txt