Skip to content
Snippets Groups Projects
Commit d8b6060f authored by glider@chromium.org's avatar glider@chromium.org
Browse files

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
parent 1fa0c358
No related branches found
No related tags found
No related merge requests found
......@@ -332,9 +332,19 @@
# Do the same for heap leak checker.
'-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapPKvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi',
'-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl',
]},
}],
[ 'linux_use_heapchecker==0', {
# Do not compile and link the heapchecker source.
'sources!': [
'<(tcmalloc_dir)/src/heap-checker-bcad.cc',
'<(tcmalloc_dir)/src/heap-checker.cc',
],
},
}],
# Disable the heap checker in tcmalloc.
'cflags': [
'-DNO_HEAP_CHECK',
],
}],
],
},
{
......
......@@ -7,7 +7,7 @@
#include "build/build_config.h"
#if defined(OS_LINUX) && defined(USE_TCMALLOC)
#if defined(OS_LINUX) && defined(USE_HEAPCHECKER)
#include "third_party/tcmalloc/chromium/src/google/heap-checker.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
......
......@@ -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'],
}],
],
},
}],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment