Mesa (mesa_7_5_branch): scons: Less aggressive optimizations for MSVC 64bit compiler.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Wed Jun 3 01:41:33 UTC 2009


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

Author: José Fonseca <jfonseca at vmware.com>
Date:   Tue Jun  2 18:41:12 2009 -0700

scons: Less aggressive optimizations for MSVC 64bit compiler.

MSVC 64bit compiler takes forever on some of the files.

Might want to revisit this again later.

---

 scons/gallium.py |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/scons/gallium.py b/scons/gallium.py
index 5e59636..0d58436 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -362,11 +362,24 @@ def generate(env):
               '/GL-', # disable whole program optimization
             ]
         else:
+            if env['machine'] == 'x86_64':
+                cflags += [
+                    # Same as /O2, but without global optimizations or auto-inlining
+                    # http://msdn.microsoft.com/en-us/library/8f8h5cxt.aspx
+                    '/Ob1', # enable inline expansion, disable auto-inlining
+                    '/Oi', # enable intrinsic functions
+                    '/Ot', # favors fast code
+                    '/Oy', # omit frame pointer
+                    '/Gs', # enable stack probes
+                    '/GF', # eliminate duplicate strings
+                    '/Gy', # enable function-level linking
+                ]
+            else:
+                cflags += [
+                    '/O2', # optimize for speed
+                ]
             cflags += [
-              '/Ox', # maximum optimizations
-              '/Oi', # enable intrinsic functions
-              '/Ot', # favor code speed
-              #'/fp:fast', # fast floating point 
+                #'/fp:fast', # fast floating point 
             ]
         if env['profile']:
             cflags += [




More information about the mesa-commit mailing list