Permalink
Browse files

add -flto (link time optimization)

msvc was already using /LTGC
also, add /GL to all files in msvc, may provide some additional help
  • Loading branch information...
jacob1 committed Feb 22, 2018
1 parent a0a7281 commit 39d62f1aad13a2dd934643b222be9687edef1aba
Showing with 4 additions and 2 deletions.
  1. +4 −2 SConscript
@@ -468,15 +468,17 @@ if GetOption('debugging'):
env.Append(CPPDEFINES=['DEBUG'])
elif GetOption('release'):
if msvc:
env.Append(CCFLAGS=['/O2', '/Oy-', '/fp:fast'])
env.Append(CCFLAGS=['/O2', '/Oy-', '/fp:fast', '/GL'])
if GetOption('static'):
env.Append(CCFLAGS=['/MT'])
else:
env.Append(CCFLAGS=['/MD'])
else:
env.Append(CCFLAGS=['-O3', '-ftree-vectorize', '-funsafe-math-optimizations', '-ffast-math', '-fomit-frame-pointer'])
env.Append(CCFLAGS=['-O3', '-ftree-vectorize', '-funsafe-math-optimizations', '-ffast-math', '-fomit-frame-pointer', '-flto'])
if platform != "Darwin":
env.Append(CCFLAGS=['-funsafe-loop-optimizations'])
#-flto: link time optimization, gives a noticeable speed boost
env.Append(LINKFLAGS=['-flto'])
if GetOption('static'):
if platform == "Windows":

0 comments on commit 39d62f1

Please sign in to comment.