diff options
author | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 09:41:22 +0000 |
---|---|---|
committer | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 09:41:22 +0000 |
commit | d8b6060f045d93d6b0cfb6a0d8e80fc100df1749 (patch) | |
tree | ccf6ca28eae682fab54492718bb303a9aebfc95a /build | |
parent | 1fa0c358faf8fef373aca6d30b97c2879539fe9a (diff) | |
download | chromium_src-d8b6060f045d93d6b0cfb6a0d8e80fc100df1749.zip chromium_src-d8b6060f045d93d6b0cfb6a0d8e80fc100df1749.tar.gz chromium_src-d8b6060f045d93d6b0cfb6a0d8e80fc100df1749.tar.bz2 |
Add the linux_use_heapchecker GYP variable that should turn the tcmalloc heap
lleak checker on and off.
Review URL: http://codereview.chromium.org/1334002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42740 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/build_config.h | 5 | ||||
-rw-r--r-- | build/common.gypi | 9 |
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'], + }], ], }, }], |