Permalink
Browse files

SConstruct: Added generic release optimisation flags.

The x86_64 platform didn't agree with the -march=pentium3 flag. So I've
implemented some generic release flags which leaves most of the
optimisations upto the compiler and -O3, while keeping the -ffast-math
related flags.
  • Loading branch information...
1 parent 19ef30e commit e1812c1edfd9def236d6ba7a4df77c5d215ecb02 @phire phire committed with Miguel Boton Nov 28, 2011
Showing with 12 additions and 7 deletions.
  1. +12 −7 neo/SConstruct
View
@@ -313,18 +313,23 @@ if ( BUILD == 'debug-all' ):
if ( ID_MCHECK == '0' ):
ID_MCHECK = '1'
elif ( BUILD == 'debug' ):
- OPTCPPFLAGS = [ '-g', '-O1', '-D_DEBUG' ]
+ OPTCPPFLAGS = [ '-g', '-O1', '-D_DEBUG', '-fkeep-inline-functions']
if ( ID_MCHECK == '0' ):
ID_MCHECK = '1'
elif ( BUILD == 'release' ):
- # -fomit-frame-pointer: "-O also turns on -fomit-frame-pointer on machines where doing so does not interfere with debugging."
- # on x86 have to set it explicitely
- # -finline-functions: implicit at -O3
- # -fschedule-insns2: implicit at -O2
- # no-unsafe-math-optimizations: that should be on by default really. hit some wonko bugs in physics code because of that
- OPTCPPFLAGS = [ '-O3', '-march=pentium3', '-Winline', '-ffast-math', '-fno-unsafe-math-optimizations', '-fomit-frame-pointer' ]
+ if( cpu == 'x86' ):
+ # -fomit-frame-pointer: "-O also turns on -fomit-frame-pointer on machines where doing so does not interfere with debugging."
+ # on x86 have to set it explicitely
+ # -finline-functions: implicit at -O3
+ # -fschedule-insns2: implicit at -O2
+ # no-unsafe-math-optimizations: that should be on by default really. hit some wonko bugs in physics code because of that
+ OPTCPPFLAGS = [ '-O3', '-march=pentium3', '-Winline', '-ffast-math', '-fno-unsafe-math-optimizations', '-fomit-frame-pointer' ]
+ else:
+ # generic optimisation flags for platforms that don't have hand tuned flags.
+ OPTCPPFLAGS = [ '-O3', '-Winline', '-ffast-math', '-fno-unsafe-math-optimizations' ]
if ( ID_MCHECK == '0' ):
ID_MCHECK = '2'
+
else:
print 'Unknown build configuration ' + BUILD
sys.exit(0)

0 comments on commit e1812c1

Please sign in to comment.