summaryrefslogtreecommitdiffstats
path: root/scons
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-01-06 16:16:38 +0000
committerJosé Fonseca <[email protected]>2009-01-08 12:05:03 +0000
commit1781d7fa3880ffb6d3062414704fb4d29e9297ad (patch)
treeee80eddb9ece0579273bc9da1be17dc162105710 /scons
parent0db6804699e9d01a7957f853ce6ebfccbcd9906f (diff)
scons: Choose the appropriate MSVC CRT.
Diffstat (limited to 'scons')
-rw-r--r--scons/gallium.py10
-rw-r--r--scons/generic.py10
2 files changed, 20 insertions, 0 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index 92cafa27e0c..3d5a0532eca 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -392,6 +392,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':
diff --git a/scons/generic.py b/scons/generic.py
index f0bb3de9fcd..0ed21a4e6ce 100644
--- a/scons/generic.py
+++ b/scons/generic.py
@@ -458,6 +458,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':