summaryrefslogtreecommitdiff
path: root/config.mak.uname
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2019-06-25 14:49:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-25 17:46:57 (GMT)
commit556702f86cb043f18bf46dceec25fe1e783c4590 (patch)
tree79bfbdf11c7c3b20f31113abf4e6f4704b4865ea /config.mak.uname
parentdce7d295514f0acebb897cc37a451963d60588f5 (diff)
downloadgit-556702f86cb043f18bf46dceec25fe1e783c4590.zip
git-556702f86cb043f18bf46dceec25fe1e783c4590.tar.gz
git-556702f86cb043f18bf46dceec25fe1e783c4590.tar.bz2
msvc: add a compile-time flag to allow detailed heap debugging
MS Visual C comes with a few neat features we can use to analyze the heap consumption (i.e. leaks, max memory, etc). With this patch, we introduce support via the build-time flag `USE_MSVC_CRTDBG`. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.mak.uname')
-rw-r--r--config.mak.uname4
1 files changed, 4 insertions, 0 deletions
diff --git a/config.mak.uname b/config.mak.uname
index b8c52e4..3fde48c 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -448,6 +448,10 @@ else
endif
BASIC_CFLAGS += $(sdk_libs) $(msvc_libs)
+ifneq ($(USE_MSVC_CRTDBG),)
+ # Optionally enable memory leak reporting.
+ BASIC_CFLAGS += -DUSE_MSVC_CRTDBG
+endif
BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1
# Always give "-Zi" to the compiler and "-debug" to linker (even in
# release mode) to force a PDB to be generated (like RelWithDebInfo).