summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2016-05-14 11:37:45 -0400
committerAndrew Morrow <acm@mongodb.com>2016-05-16 16:39:34 -0400
commitdca92896c83b519d7754df70f2a6b896804fb859 (patch)
treea654f148f6c17c3be27324eff02f092d8036cc0e /SConstruct
parent1991b885292a271437f7a72f22ca86f0f720a75b (diff)
downloadmongo-dca92896c83b519d7754df70f2a6b896804fb859.tar.gz
SERVER-23826 Run all tests under the undefined behavior sanitizer
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct16
1 files changed, 14 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index 6c4948068c0..5b9de702a72 100644
--- a/SConstruct
+++ b/SConstruct
@@ -2148,8 +2148,20 @@ def doConfigure(myenv):
myenv['ENV']['TSAN_OPTIONS'] = tsan_options
if using_ubsan:
- # By default, undefined behavior sanitizer doesn't stop on the first error. Make it so.
- AddToCCFLAGSIfSupported(myenv, "-fno-sanitize-recover")
+ # By default, undefined behavior sanitizer doesn't stop on
+ # the first error. Make it so. Newer versions of clang
+ # have renamed the flag.
+ if not AddToCCFLAGSIfSupported(myenv, "-fno-sanitize-recover"):
+ AddToCCFLAGSIfSupported(myenv, "-fno-sanitize-recover=undefined")
+
+ # Ideally, we would apply this only in the WiredTiger
+ # directory until WT-2631 is resolved, but we can't rely
+ # on the flag being supported until clang-3.6, which isn't
+ # our minimum, and we don't have access to
+ # AddToCCFFLAGSIfSupported in the scope of the WT
+ # Sconscript.
+ #
+ AddToCCFLAGSIfSupported(myenv, "-fno-sanitize=nonnull-attribute")
if myenv.ToolchainIs('msvc') and optBuild:
# http://blogs.msdn.com/b/vcblog/archive/2013/09/11/introducing-gw-compiler-switch.aspx