diff options
author | Andrew Morrow <acm@mongodb.com> | 2014-04-12 09:00:41 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2014-04-14 10:46:16 -0400 |
commit | 2c01237bc054bb4b32226545cba9782b5d87bcf2 (patch) | |
tree | 48f17dc12f5d434792bb25570249dd1afbfbf41a /SConstruct | |
parent | 9ca0f4423561d2c615f4ae588068e6104794b7ee (diff) | |
download | mongo-2c01237bc054bb4b32226545cba9782b5d87bcf2.tar.gz |
SERVER-13544 Enable gperftools for C++11 builds
The following change was backported:
https://code.google.com/p/gperftools/source/detail?r=18fbc316eebea9db2d7ec41e161c0a3fbb09fa42
Another change we wanted was:
https://code.google.com/p/gperftools/source/detail?r=6287bbbbad8730712cfd1ee28ecc0648cbaa9f94#
However, since that patch must hit every PR/SC instance and the code has evolved from that point
we instead just ran the following two scripts over the gperftools source tree:
find . -type f | xargs egrep -l '"PR\w+"' | xargs perl -pi -e 's|"PR(\w+)"|" PR\1 "|g'
find . -type f | xargs egrep -l '"SC\w+"' | xargs perl -pi -e 's|"SC(\w+)"|" SC\1 "|g'
and then manually fixing up the one reference to GPRIuPTHREAD, which achieved the same result.
Finally, remove the logic preventing mixture of C++11 and gperftools from the build system.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/SConstruct b/SConstruct index 2ffe91ca8a9..fbb654de8d7 100644 --- a/SConstruct +++ b/SConstruct @@ -1163,13 +1163,6 @@ def doConfigure(myenv): if not AddToCXXFLAGSIfSupported(myenv, '-std=c++0x'): print( 'C++11 mode requested, but cannot find a flag to enable it' ) Exit(1) - # Our current builtin tcmalloc is not compilable in C++11 mode. Remove this - # check when our builtin release of tcmalloc contains the resolution to - # http://code.google.com/p/gperftools/issues/detail?id=477. - if get_option('allocator') == 'tcmalloc': - if not use_system_version_of_library('tcmalloc'): - print( 'TCMalloc is not currently compatible with C++11' ) - Exit(1) if not AddToCFLAGSIfSupported(myenv, '-std=c99'): print( 'C++11 mode selected for C++ files, but failed to enable C99 for C files' ) |