summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/build_config.h5
-rw-r--r--build/common.gypi9
2 files changed, 14 insertions, 0 deletions
diff --git a/build/build_config.h b/build/build_config.h
index 29d55b3..154f237 100644
--- a/build/build_config.h
+++ b/build/build_config.h
@@ -65,6 +65,11 @@
#define USE_TCMALLOC 1
#endif
+// Use heapchecker.
+#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(NO_HEAPCHECKER)
+#define USE_HEAPCHECKER 1
+#endif
+
// Compiler detection.
#if defined(__GNUC__)
#define COMPILER_GCC 1
diff --git a/build/common.gypi b/build/common.gypi
index c22fb5c..3b8f20e 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -205,6 +205,9 @@
# Enable TCMalloc.
'linux_use_tcmalloc%': 1,
+ # Disable TCMalloc's heapchecker.
+ 'linux_use_heapchecker%': 0,
+
# Set to select the Title Case versions of strings in GRD files.
'use_titlecase_in_grd_files%': 0,
@@ -965,9 +968,15 @@
}]
],
}],
+ ['linux_use_heapchecker==1', {
+ 'variables': {'linux_use_tcmalloc%': 1},
+ }],
['linux_use_tcmalloc==0', {
'defines': ['NO_TCMALLOC'],
}],
+ ['linux_use_heapchecker==0', {
+ 'defines': ['NO_HEAPCHECKER'],
+ }],
],
},
}],