diff options
author | José Fonseca <jfonseca@vmware.com> | 2011-02-08 10:26:17 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2011-02-09 18:31:21 +0000 |
commit | 3b8bb7b449dae6c16df0fa45e6567ec3d6b05dcc (patch) | |
tree | e0cedad5ec5f26107940714db3c71b6ec5a872f7 /scons | |
parent | 2d958853080d74da3abb4251fba75cd7df9cd879 (diff) |
scons: Restrict whole program optimization to release builds.
It just takes forever, so it is inadequate for continuous testings
(i.e., checked and profile build types).
Diffstat (limited to 'scons')
-rw-r--r-- | scons/gallium.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scons/gallium.py b/scons/gallium.py index df060f01a3..c4144273a5 100644 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -402,13 +402,19 @@ def generate(env): '/Od', # disable optimizations '/Oi', # enable intrinsic functions '/Oy-', # disable frame pointer omission - '/GL-', # disable whole program optimization ] else: ccflags += [ '/O2', # optimize for speed + ] + if env['build'] == 'release': + ccflags += [ '/GL', # enable whole program optimization ] + else: + ccflags += [ + '/GL-', # disable whole program optimization + ] ccflags += [ '/fp:fast', # fast floating point '/W3', # warning level @@ -498,7 +504,7 @@ def generate(env): else: env['_LIBFLAGS'] = '-Wl,--start-group ' + env['_LIBFLAGS'] + ' -Wl,--end-group' if msvc: - if env['build'] != 'debug': + if env['build'] == 'release': # enable Link-time Code Generation linkflags += ['/LTCG'] env.Append(ARFLAGS = ['/LTCG']) |