summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2021-02-21 13:05:25 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-23 13:16:37 +0000
commit691cb1577300d5df5118cd2b77c02b99a833d174 (patch)
tree34d91a7c4c3658407030fcee7be796c372b4e906 /SConstruct
parent73fa2dc4169b55347758584144d2b0eb5bccc15f (diff)
downloadmongo-691cb1577300d5df5118cd2b77c02b99a833d174.tar.gz
SERVER-19338 Add an experiment for allowing type-based alias analysis
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct6
1 files changed, 5 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 5af70c55217..e1b5310a05b 100644
--- a/SConstruct
+++ b/SConstruct
@@ -277,6 +277,7 @@ experimental_optimizations = [
'builtin-memcmp',
'fnsi',
'sandybridge',
+ 'tbaa',
'treevec',
]
experimental_optimization_choices = ['*']
@@ -2429,13 +2430,16 @@ if env.TargetOSIs('posix'):
# -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
env.Append( CCFLAGS=["-fno-omit-frame-pointer",
- "-fno-strict-aliasing",
"-fasynchronous-unwind-tables",
"-ggdb" if not env.TargetOSIs('emscripten') else "-g",
"-Wall",
"-Wsign-compare",
"-Wno-unknown-pragmas",
"-Winvalid-pch"] )
+
+ if not "tbaa" in selected_experimental_optimizations:
+ env.Append(CCFLAGS=["-fno-strict-aliasing"])
+
# env.Append( " -Wconversion" ) TODO: this doesn't really work yet
if env.TargetOSIs('linux', 'darwin', 'solaris'):
if not has_option("disable-warnings-as-errors"):