diff options
author | Shaun Verch <shaun.verch@10gen.com> | 2012-11-06 19:03:03 -0800 |
---|---|---|
committer | Shaun Verch <shaun.verch@10gen.com> | 2012-12-24 09:59:09 -0800 |
commit | 8214e8666e5d291b767075c250ec2b7dd06c265a (patch) | |
tree | c60c42c38478fb4bd778c35461ca4271d898cb45 /SConstruct | |
parent | 27e342b284e0b43190a09d1f9b39ad489c04c8cc (diff) | |
download | mongo-8214e8666e5d291b767075c250ec2b7dd06c265a.tar.gz |
SERVER-7513 Build tcmalloc on mac
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct index e688ebd625f..cce6db86d22 100644 --- a/SConstruct +++ b/SConstruct @@ -190,10 +190,14 @@ add_option( "distcc" , "use distcc for distributing builds" , 0 , False ) add_option( "clang" , "use clang++ rather than g++ (experimental)" , 0 , True ) # debugging/profiling help - +if os.sys.platform.startswith("linux") and (os.uname()[-1] == 'x86_64'): + defaultAllocator = 'tcmalloc' +elif (os.sys.platform == "darwin") and (os.uname()[-1] == 'x86_64'): + defaultAllocator = 'tcmalloc' +else: + defaultAllocator = 'system' add_option( "allocator" , "allocator to use (tcmalloc or system)" , 1 , True, - default=((sys.platform.startswith('linux') and (os.uname()[-1] == 'x86_64')) and - 'tcmalloc' or 'system') ) + default=defaultAllocator ) add_option( "gdbserver" , "build in gdb server support" , 0 , True ) add_option( "heapcheck", "link to heap-checking malloc-lib and look for memory leaks during tests" , 0 , False ) add_option( "gcov" , "compile with flags for gcov" , 0 , True ) |