summaryrefslogtreecommitdiff
path: root/scons
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2014-05-01 14:19:13 +0100
committerJosé Fonseca <jfonseca@vmware.com>2014-05-02 22:04:46 +0100
commit979692a52aec5d3c927f77f2602e9d848136e7ac (patch)
tree2c7aae9e9b88bb8c862eec014efc11c5ec7123c9 /scons
parent0582800dd67af7d6137768bf8ee4d52605b94683 (diff)
scons: Don't use bundled C99 headers for VS 2013.
Use the ones provided by the compiler instead. NOTE: External trees should be updated to not include '#include/c99' directory directly, but rather rely on scons/gallium.py to do the right thing. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Diffstat (limited to 'scons')
-rwxr-xr-xscons/gallium.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index ca317b0cfdc..5109ebffee0 100755
--- a/scons/gallium.py
+++ b/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