scons: Less aggressive optimizations for MSVC 64bit compiler.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 3 Jun 2009 01:41:12 +0000 (18:41 -0700)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 3 Jun 2009 01:41:12 +0000 (18:41 -0700)
MSVC 64bit compiler takes forever on some of the files.

Might want to revisit this again later.

scons/gallium.py

index 5e596360871502e31242290ca9ebdde14bf77a93..0d5843603e9659cba19a01abf50c034a0c0ab8b1 100644 (file)
@@ -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 += [