Skip to content

contrib/buildsystems: fix Visual Studio Debug configuration

Alexandr Miloslavskiy via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1contrib/buildsystems: fix Visual Studio Debug configurationcontrib/buildsystems/Generators/Vcxproj.pm+8 -710 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] contrib/buildsystems: fix Visual Studio Debug configuration

Even though Debug configuration builds, the resulting build is incorrect in a subtle way: it mixes up Debug and Release binaries, which in turn causes hard-to-predict bugs.

In my case, when git calls iconv library, iconv sets 'errno' and git then tests it, but in Debug and Release CRT those 'errno' are different memory locations.

This patch addresses 3 connected bugs: 1) Typo in '(Configuration)'. As a result, Debug configuration condition is always false and Release path is taken instead. 2) Regexp that replaced 'zlib.lib' with 'zlibd.lib' was only affecting the first occurrence. However, some projects have it listed twice. Previously this bug was hidden, because Debug path was never taken. I decided that avoiding double -lz in makefile is fragile and I'd better replace all occurrences instead. 3) In Debug, 'libcurl-d.lib' should be used instead of 'libcurl.lib'. Previously this bug was hidden, because Debug path was never taken.

Alexandr Miloslavskiy (1):
contrib/buildsystems: fix Visual Studio Debug configuration

 contrib/buildsystems/Generators/Vcxproj.pm | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

base-commit: 4c86140027f4a0d2caaa3ab4bd8bfc5ce3c11c8a
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-348%2FSyntevoAlex%2F%230188_VisualStudio_Debug_build_fixes-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-348/SyntevoAlex/#0188_VisualStudio_Debug_build_fixes-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/348

Signature · 1 line
gitgitgadget