Mesa (mesa_7_7_branch): scons: Tweak MSVC release options.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Dec 11 16:11:28 UTC 2009


Module: Mesa
Branch: mesa_7_7_branch
Commit: da3bc492d2438ac915e720c17b54d0d12ffd8a97
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=da3bc492d2438ac915e720c17b54d0d12ffd8a97

Author: José Fonseca <jfonseca at vmware.com>
Date:   Fri Dec 11 15:16:22 2009 +0000

scons: Tweak MSVC release options.

Enable whole program optimizations and fast math.

---

 scons/gallium.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/scons/gallium.py b/scons/gallium.py
index 0e5de0d..f4e82e8 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -391,15 +391,15 @@ def generate(env):
         else:
             ccflags += [
                 '/O2', # optimize for speed
-                #'/fp:fast', # fast floating point 
+                '/GL', # enable whole program optimization
             ]
         ccflags += [
+            '/fp:fast', # fast floating point 
             '/W3', # warning level
             #'/Wp64', # enable 64 bit porting warnings
         ]
         if env['machine'] == 'x86':
             ccflags += [
-                #'/QIfist', # Suppress _ftol
                 #'/arch:SSE2', # use the SSE2 instructions
             ]
         if platform == 'windows':
@@ -477,6 +477,11 @@ def generate(env):
         ]
         # Handle circular dependencies in the libraries
         env['_LIBFLAGS'] = '-Wl,--start-group ' + env['_LIBFLAGS'] + ' -Wl,--end-group'
+    if msvc:
+        if not env['debug']:
+            # enable Link-time Code Generation
+            linkflags += ['/LTCG']
+            env.Append(ARFLAGS = ['/LTCG'])
     if platform == 'windows' and msvc:
         # See also:
         # - http://msdn2.microsoft.com/en-us/library/y0zzbyt4.aspx




More information about the mesa-commit mailing list