summaryrefslogtreecommitdiff
path: root/scons/gallium.py
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-01-06 16:16:38 +0000
committerJosé Fonseca <jfonseca@vmware.com>2009-01-06 18:23:16 +0000
commit26ba5ce0e8fc54d330a0f26d0c5ab76e250fae3a (patch)
tree2fcac7598f7aa54ab0c19339ae3e390ab3f01ddd /scons/gallium.py
parent4ebb8f78e780ffa6f5f7082d0e36a792bceca321 (diff)
scons: Choose the appropriate MSVC CRT.
Diffstat (limited to 'scons/gallium.py')
-rw-r--r--scons/gallium.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index 19eeb18be8..33bd65dd54 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -390,6 +390,16 @@ def generate(env):
env.Append(CFLAGS = cflags)
env.Append(CXXFLAGS = cflags)
+ if env['platform'] == 'windows' and msvc:
+ # Choose the appropriate MSVC CRT
+ # http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
+ if env['debug']:
+ env.Append(CCFLAGS = ['/MTd'])
+ env.Append(SHCCFLAGS = ['/LDd'])
+ else:
+ env.Append(CCFLAGS = ['/MT'])
+ env.Append(SHCCFLAGS = ['/LD'])
+
# Assembler options
if gcc:
if env['machine'] == 'x86':