scons: Choose the appropriate MSVC CRT.

This commit is contained in:
José Fonseca
2009-01-06 16:16:38 +00:00
parent 4ebb8f78e7
commit 26ba5ce0e8
2 changed files with 20 additions and 0 deletions

View File

@@ -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':

View File

@@ -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':