i965g: back out unintentional changes to linux-dri
[mesa.git] / scons / generic.py
index 0b3ef5a15d501598fc782cfe63c5b53e6ab9eeef..859bf2ae64ea494683f7d0d1f688b3a982896f34 100644 (file)
@@ -264,7 +264,7 @@ def generate(env):
         pass
 
     # Build type
-    env['debug'] = _bool_map[ARGUMENTS.get('debug', 'yes')]
+    env['debug'] = _bool_map[ARGUMENTS.get('debug', 'no')]
     env['profile'] = _bool_map[ARGUMENTS.get('profile', 'no')]
 
     # Put build output in a separate dir, which depends on the current
@@ -335,7 +335,11 @@ def generate(env):
         if msvc:
             cppdefines += [
                 'VC_EXTRALEAN',
+                '_USE_MATH_DEFINES',
+                '_CRT_SECURE_NO_WARNINGS',
                 '_CRT_SECURE_NO_DEPRECATE',
+                '_SCL_SECURE_NO_WARNINGS',
+                '_SCL_SECURE_NO_DEPRECATE',
             ]
         if debug:
             cppdefines += ['_DEBUG']
@@ -402,8 +406,6 @@ def generate(env):
             ccflags += ['-O0', '-g3'] # mingw 4.2.1 optimizer is broken
         else:
             ccflags += ['-O3', '-g0']
-        if env['profile']:
-            ccflags += ['-pg']
         if env['machine'] == 'x86':
             ccflags += [
                 '-m32',
@@ -416,16 +418,18 @@ def generate(env):
         # See also:
         # - http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
         ccflags += [
-            '-Werror=declaration-after-statement',
             '-Wall',
-            '-Wmissing-prototypes',
             '-Wmissing-field-initializers',
             '-Wpointer-arith',
             '-Wno-long-long',
             '-ffast-math',
-            '-std=gnu99',
             '-fmessage-length=0', # be nice to Eclipse
         ]
+        cflags += [
+            '-Werror=declaration-after-statement',
+            '-Wmissing-prototypes',
+            '-std=gnu99',
+        ]
     if msvc:
         # See also:
         # - http://msdn.microsoft.com/en-us/library/19z1t1wy.aspx
@@ -444,11 +448,6 @@ def generate(env):
               '/Ot', # favor code speed
               #'/fp:fast', # fast floating point 
             ]
-        if env['profile']:
-            ccflags += [
-                '/Gh', # enable _penter hook function
-                '/GH', # enable _pexit hook function
-            ]
         ccflags += [
             '/W3', # warning level
             #'/Wp64', # enable 64 bit porting warnings