From 3800339557b1003b77d79dc2c536b21f22ca2abf Mon Sep 17 00:00:00 2001 From: Mark Benvenuto Date: Thu, 23 Apr 2015 12:57:52 -0400 Subject: TC Malloc --- SConstruct | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 9d9a3918a2e..1d32cf05a6c 100644 --- a/SConstruct +++ b/SConstruct @@ -34,6 +34,9 @@ AddOption("--enable-python", dest="lang-python", type="string", nargs=1, action= AddOption("--enable-snappy", dest="snappy", type="string", nargs=1, action="store", help="Use snappy compression") +AddOption("--enable-tcmalloc", dest="tcmalloc", type="string", nargs=1, action="store", + help="Use TCMalloc for memory allocation") + AddOption("--enable-verbose", dest="verbose", action="store_true", default=False, help="Configure WiredTiger to support the verbose configuration string to wiredtiger_open") @@ -113,6 +116,7 @@ useZlib = GetOption("zlib") useSnappy = GetOption("snappy") useLz4 = GetOption("lz4") useBdb = GetOption("bdb") +useTcmalloc = GetOption("tcmalloc") wtlibs = [] conf = Configure(env) @@ -157,6 +161,16 @@ if useBdb: print 'db.h must be installed!' Exit(1) +if useTcmalloc: + conf.env.Append(CPPPATH=[useTcmalloc + "/include"]) + conf.env.Append(LIBPATH=[useTcmalloc + "/lib"]) + if conf.CheckCHeader('gperftools/tcmalloc.h'): + wtlibs.append("libtcmalloc_minimal") + conf.env.Append(CPPDEFINES=['HAVE_LIBTCMALLOC']) + else: + print 'tcmalloc.h must be installed!' + Exit(1) + env = conf.Finish() # Configure build environment variables -- cgit v1.2.1