gallium/radeon: shorten render_cond variable names
[mesa.git] / scons / gallium.py
index 70504123d099a71dc305eedeb406e7a1634b5d3b..46dbf0ebd0e58e71f131c72ba04ca522d7c3cc54 100755 (executable)
@@ -300,6 +300,7 @@ def generate(env):
 
     # C preprocessor options
     cppdefines = []
+    cppdefines += ['__STDC_LIMIT_MACROS']
     if env['build'] in ('debug', 'checked'):
         cppdefines += ['DEBUG']
     else:
@@ -509,6 +510,7 @@ def generate(env):
             '/wd4018', # signed/unsigned mismatch
             '/wd4056', # overflow in floating-point constant arithmetic
             '/wd4244', # conversion from 'type1' to 'type2', possible loss of data
+            '/wd4267', # 'var' : conversion from 'size_t' to 'type', possible loss of data
             '/wd4305', # truncation from 'type1' to 'type2'
             '/wd4351', # new behavior: elements of array 'array' will be default initialized
             '/wd4756', # overflow in constant arithmetic
@@ -548,6 +550,7 @@ def generate(env):
             env.Append(CCFLAGS = [
                 '/analyze',
                 #'/analyze:log', '${TARGET.base}.xml',
+                '/wd28251', # Inconsistent annotation for function
             ])
         if env['clang']:
             # scan-build will produce more comprehensive output
@@ -642,6 +645,13 @@ def generate(env):
             # disable all MSVC extensions.
             '-DYY_USE_CONST=',
         ])
+        # Flex relies on __STDC_VERSION__>=199901L to decide when to include
+        # C99 inttypes.h.  We always have inttypes.h available with MSVC
+        # (either the one bundled with MSVC 2013, or the one we bundle
+        # ourselves), but we can't just define __STDC_VERSION__ without
+        # breaking stuff, as MSVC doesn't fully support C99.  There's also no
+        # way to premptively include stdint.
+        env.Append(CCFLAGS = ['-FIinttypes.h'])
     if host_platform.system() == 'Windows':
         # Prefer winflexbison binaries, as not only they are easier to install
         # (no additional dependencies), but also better Windows support.