X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=scons%2Fgallium.py;h=46dbf0ebd0e58e71f131c72ba04ca522d7c3cc54;hb=eb0d3e8a90df3f6a39a3ffc911a335554fc8cd98;hp=70504123d099a71dc305eedeb406e7a1634b5d3b;hpb=e4d95982ee36097a86c4afec3f34924964978c21;p=mesa.git diff --git a/scons/gallium.py b/scons/gallium.py index 70504123d09..46dbf0ebd0e 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -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.