@@ -256,15 +256,8 @@ add_option( "durableDefaultOff" , "have durable default to off" , 0 , True )
256
256
add_option ( "pch" , "use precompiled headers to speed up the build (experimental)" , 0 , True , "usePCH" )
257
257
add_option ( "distcc" , "use distcc for distributing builds" , 0 , False )
258
258
259
- # debugging/profiling help
260
- if os .sys .platform .startswith ("linux" ) and (os .uname ()[- 1 ] == 'x86_64' ):
261
- defaultAllocator = 'tcmalloc'
262
- elif (os .sys .platform == "darwin" ) and (os .uname ()[- 1 ] == 'x86_64' ):
263
- defaultAllocator = 'tcmalloc'
264
- else :
265
- defaultAllocator = 'system'
266
- add_option ( "allocator" , "allocator to use (tcmalloc or system)" , 1 , True ,
267
- default = defaultAllocator )
259
+ add_option ( "allocator" , "allocator to use (tcmalloc or system)" , 1 , False )
260
+
268
261
add_option ( "gdbserver" , "build in gdb server support" , 0 , True )
269
262
add_option ( "heapcheck" , "link to heap-checking malloc-lib and look for memory leaks during tests" , 0 , False )
270
263
add_option ( "gcov" , "compile with flags for gcov" , 0 , True )
@@ -1203,13 +1196,6 @@ def doConfigure(myenv):
1203
1196
if not AddToCXXFLAGSIfSupported (myenv , '-std=c++0x' ):
1204
1197
print ( 'C++11 mode requested, but cannot find a flag to enable it' )
1205
1198
Exit (1 )
1206
- # Our current builtin tcmalloc is not compilable in C++11 mode. Remove this
1207
- # check when our builtin release of tcmalloc contains the resolution to
1208
- # http://code.google.com/p/gperftools/issues/detail?id=477.
1209
- if get_option ('allocator' ) == 'tcmalloc' :
1210
- if not use_system_version_of_library ('tcmalloc' ):
1211
- print ( 'TCMalloc is not currently compatible with C++11' )
1212
- Exit (1 )
1213
1199
1214
1200
if not AddToCFLAGSIfSupported (myenv , '-std=c99' ):
1215
1201
print ( 'C++11 mode selected for C++ files, but failed to enable C99 for C files' )
@@ -1443,32 +1429,14 @@ def doConfigure(myenv):
1443
1429
if conf .env ['MONGO_HAVE_TIMEGM' ]:
1444
1430
conf .env .Append (CPPDEFINES = ['MONGO_HAVE_TIMEGM' ])
1445
1431
1446
- # 'tcmalloc' needs to be the last library linked. Please, add new libraries before this
1447
- # point.
1448
- if get_option ('allocator' ) == 'tcmalloc' :
1449
- if use_system_version_of_library ('tcmalloc' ):
1450
- conf .FindSysLibDep ("tcmalloc" , ["tcmalloc" ])
1451
- elif has_option ("heapcheck" ):
1452
- print ("--heapcheck does not work with the tcmalloc embedded in the mongodb source "
1453
- "tree. Use --use-system-tcmalloc." )
1454
- Exit (1 )
1455
- elif get_option ('allocator' ) == 'system' :
1456
- pass
1457
- else :
1458
- print "Invalid --allocator parameter: \" %s\" " % get_option ('allocator' )
1459
- Exit (1 )
1460
-
1461
- if has_option ("heapcheck" ):
1462
- if not debugBuild :
1463
- print ( "--heapcheck needs --d or --dd" )
1464
- Exit ( 1 )
1432
+ if has_option ('allocator' ):
1433
+ print ("WARNING: --allocator option ignored, not meaningful for driver build" )
1465
1434
1466
- if not conf .CheckCXXHeader ( "google/heap-checker.h" ):
1467
- print ( "--heapcheck neads header 'google/heap-checker.h'" )
1468
- Exit ( 1 )
1435
+ if has_option ('use-system-tcmalloc' ):
1436
+ print ("WARNING: --use-system-tcmalloc option ignored, not meaningful for driver build" )
1469
1437
1470
- conf . env . Append ( CPPDEFINES = [ "HEAP_CHECKING" ] )
1471
- conf . env . Append ( CCFLAGS = [ "-fno-omit-frame-pointer" ] )
1438
+ if has_option ( "heapcheck" ):
1439
+ print ( "WARNING: --heapcheck ignored, not meaningful for driver build" )
1472
1440
1473
1441
# ask each module to configure itself and the build environment.
1474
1442
moduleconfig .configure_modules (mongo_modules , conf )
0 commit comments