diff options
author | Andrew Morrow <acm@mongodb.com> | 2017-03-11 11:14:27 -0700 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2017-03-14 23:02:10 -0400 |
commit | 4948241998903e628ea3c18204191e71ee4b3896 (patch) | |
tree | 0530d937f7acf368d1d56c6a4a3b925e2cb8cc76 /SConstruct | |
parent | 0a3d35d8d7ea33c268c4e32cd5c7f7d84305d45b (diff) | |
download | mongo-4948241998903e628ea3c18204191e71ee4b3896.tar.gz |
SERVER-28133 Don't mix the ODR detector, clang, and libstdc++
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct index 7eaa5da1ccb..57c95c007e2 100644 --- a/SConstruct +++ b/SConstruct @@ -2467,8 +2467,12 @@ def doConfigure(myenv): # Explicitly use the new gnu hash section if the linker offers it. AddToLINKFLAGSIfSupported(myenv, '-Wl,--hash-style=gnu') - # Try to have the linker tell us about ODR violations. Don't use this on UBSAN (see SERVER-27229) for now. - if not has_option('sanitize') or not 'undefined' in get_option('sanitize'): + # Try to have the linker tell us about ODR violations. Don't + # use it when using clang with libstdc++, as libstdc++ was + # probably built with GCC. That combination appears to cause + # false positives for the ODR detector. See SERVER-28133 for + # additional details. + if not (myenv.ToolchainIs('clang') and usingLibStdCxx): AddToLINKFLAGSIfSupported(myenv, '-Wl,--detect-odr-violations') # Disallow an executable stack. Also, issue a warning if any files are found that would |