mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 17:10:48 +01:00
SERVER-15263 Guard -D_GLIBCXX_DEBUG behind a SCons flag.
Per the message in the JIRA ticket, the _GLIBCXX_DEBUG versions of std::list<T> type appears to have a concurrency error that leads to segfaults not related to the code under test.
This commit is contained in:
parent
4677734e7a
commit
c7b0fc8e6a
23
SConstruct
23
SConstruct
@ -237,6 +237,9 @@ add_option( "js-engine", "JavaScript scripting engine implementation", 1, False,
|
||||
type='choice', default=js_engine_choices[0], choices=js_engine_choices)
|
||||
add_option( "libc++", "use libc++ (experimental, requires clang)", 0, True )
|
||||
|
||||
add_option( "use-glibcxx-debug",
|
||||
"Enable the glibc++ debug implementations of the C++ standard libary", 0, True )
|
||||
|
||||
# mongo feature options
|
||||
add_option( "noshell", "don't build shell" , 0 , True )
|
||||
add_option( "safeshell", "don't let shell scripts run programs (still, don't run untrusted scripts)" , 0 , True )
|
||||
@ -1452,12 +1455,20 @@ def doConfigure(myenv):
|
||||
cxx11_mode = "on"
|
||||
myenv = cxx11Env
|
||||
|
||||
# If we are using a modern libstdc++ and this is a debug build and we control all C++
|
||||
# dependencies, then turn on the debugging features in libstdc++.
|
||||
if debugBuild and usingLibStdCxx and haveGoodLibStdCxx:
|
||||
# We can't do this if we are using any system C++ libraries.
|
||||
if (not using_system_version_of_cxx_libraries()):
|
||||
myenv.Append(CPPDEFINES=["_GLIBCXX_DEBUG"]);
|
||||
if has_option("use-glibcxx-debug"):
|
||||
# If we are using a modern libstdc++ and this is a debug build and we control all C++
|
||||
# dependencies, then turn on the debugging features in libstdc++.
|
||||
if not debugBuild:
|
||||
print("--use-glibcxx-debug requires --dbg=on")
|
||||
Exit(1)
|
||||
if not usingLibStdCxx or not haveGoodLibStdCxx:
|
||||
print("--use-glibcxx-debug is only compatible with the GNU implementation of the "
|
||||
"C++ standard libary, and requires minimum version 4.6")
|
||||
Exit(1)
|
||||
if using_system_version_of_cxx_libraries():
|
||||
print("--use-glibcxx-debug not compatible with system versions of C++ libraries.")
|
||||
Exit(1)
|
||||
myenv.Append(CPPDEFINES=["_GLIBCXX_DEBUG"]);
|
||||
|
||||
# Check if we are on a POSIX system by testing if _POSIX_VERSION is defined.
|
||||
def CheckPosixSystem(context):
|
||||
|
Loading…
Reference in New Issue
Block a user