From 691cb1577300d5df5118cd2b77c02b99a833d174 Mon Sep 17 00:00:00 2001 From: Andrew Morrow Date: Sun, 21 Feb 2021 13:05:25 -0500 Subject: SERVER-19338 Add an experiment for allowing type-based alias analysis --- SConstruct | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'SConstruct') 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"): -- cgit v1.2.1