aboutsummaryrefslogtreecommitdiff
path: root/mesalib/scons/gallium.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/scons/gallium.py')
-rw-r--r--mesalib/scons/gallium.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/mesalib/scons/gallium.py b/mesalib/scons/gallium.py
index d13d0e67b..5109ebffe 100644
--- a/mesalib/scons/gallium.py
+++ b/mesalib/scons/gallium.py
@@ -433,6 +433,12 @@ def generate(env):
# See also:
# - http://msdn.microsoft.com/en-us/library/19z1t1wy.aspx
# - cl /?
+ if 'MSVC_VERSION' not in env or distutils.version.LooseVersion(env['MSVC_VERSION']) < distutils.version.LooseVersion('12.0'):
+ # Use bundled stdbool.h and stdint.h headers for older MSVC
+ # versions. stdint.h was introduced in MSVC 2010, but stdbool.h
+ # was only introduced in MSVC 2013.
+ top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+ env.Append(CPPPATH = [os.path.join(top_dir, 'include/c99')])
if env['build'] == 'debug':
ccflags += [
'/Od', # disable optimizations
@@ -455,7 +461,9 @@ def generate(env):
]
ccflags += [
'/W3', # warning level
- #'/Wp64', # enable 64 bit porting warnings
+ '/wd4244', # conversion from 'type1' to 'type2', possible loss of data
+ '/wd4305', # truncation from 'type1' to 'type2'
+ '/wd4800', # forcing value to bool 'true' or 'false' (performance warning)
'/wd4996', # disable deprecated POSIX name warnings
]
if env['machine'] == 'x86':