]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
winbuild: fix PE version info debug flag
authorJay Satiro <raysatiro@yahoo.com>
Wed, 22 May 2024 05:39:44 +0000 (01:39 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Wed, 22 May 2024 06:30:40 +0000 (02:30 -0400)
- Only set PE file flag VS_FF_DEBUG if curl.exe and libcurl.dll were
  built with winbuild option DEBUG=yes which builds with debug info.

VS_FF_DEBUG is a PE flag (Portable Executable file flag - dll, exe, etc)
that indicates the file contains or was built with debug info.

Prior to this change when winbuild was used to build curl, curl.exe
and libcurl.dll always had VS_FF_DEBUG set, regardless of build option
DEBUG=yes/no, due to some bad logic.

Closes https://github.com/curl/curl/pull/13739

winbuild/MakefileBuild.vc

index 474557bf5aba70de6153518b6c4b8dc5eb17089e..0d0a51623c4bd68c194b74ee932ac0e3882fda26 100644 (file)
@@ -428,13 +428,13 @@ CFGSET = true
 # CURL_XX macros are for the curl.exe command\r
 \r
 !IF "$(DEBUG)"=="yes"\r
-RC_FLAGS = /dDEBUGBUILD=1 /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc\r
+RC_FLAGS = /d_DEBUG /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc\r
 CURL_CC       = $(CC_DEBUG) $(RTLIB_DEBUG)\r
-CURL_RC_FLAGS = $(CURL_RC_FLAGS) /i../include /dDEBUGBUILD=1 /Fo $@ $(CURL_SRC_DIR)\curl.rc\r
+CURL_RC_FLAGS = $(CURL_RC_FLAGS) /i../include /d_DEBUG /Fo $@ $(CURL_SRC_DIR)\curl.rc\r
 !ELSE\r
-RC_FLAGS = /dDEBUGBUILD=0 /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc\r
+RC_FLAGS = /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc\r
 CURL_CC       = $(CC_NODEBUG) $(RTLIB)\r
-CURL_RC_FLAGS = $(CURL_RC_FLAGS) /i../include /dDEBUGBUILD=0 /Fo $@ $(CURL_SRC_DIR)\curl.rc\r
+CURL_RC_FLAGS = $(CURL_RC_FLAGS) /i../include /Fo $@ $(CURL_SRC_DIR)\curl.rc\r
 !ENDIF\r
 \r
 !IF "$(AS_DLL)" == "true"\r