summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2020-05-04 12:51:08 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-19 16:26:53 +0000
commit3e0366d2b1ff45a3ea91b63793743023479d9c4a (patch)
treef4534da42027470d0175b98d4c1cec2148f45b53 /SConstruct
parentd6f63ec549c0cf667c4b8ad8ceed0194d0ab0159 (diff)
downloadmongo-3e0366d2b1ff45a3ea91b63793743023479d9c4a.tar.gz
SERVER-43760 Re-enable the ODR detector on a single appropriate --opt=off builder
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct7
1 files changed, 5 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index 774012cd33b..f2ee0949028 100644
--- a/SConstruct
+++ b/SConstruct
@@ -3051,8 +3051,11 @@ def doConfigure(myenv):
# probably built with GCC. That combination appears to cause
# false positives for the ODR detector. See SERVER-28133 for
# additional details.
- if (get_option('detect-odr-violations') and
- not (myenv.ToolchainIs('clang') and usingLibStdCxx)):
+ if has_option('detect-odr-violations'):
+ if myenv.ToolchainIs('clang') and usingLibStdCxx:
+ env.FatalError('The --detect-odr-violations flag does not work with clang and libstdc++')
+ if optBuild:
+ env.FatalError('The --detect-odr-violations flag is expected to only be reliable with --opt=off')
AddToLINKFLAGSIfSupported(myenv, '-Wl,--detect-odr-violations')
# Disallow an executable stack. Also, issue a warning if any files are found that would