From b429450dc59c4ee4011b6b10a0af535a9003bb2e Mon Sep 17 00:00:00 2001
From: Tobias Markmann <tm@ayena.de>
Date: Wed, 10 Aug 2016 14:09:46 +0100
Subject: Do not require debug MSVC runtime for non optimized builds

This allows building Swift with debug symbols and the
non-debug MSVC dynamic runtime.

Test-Information:

scons debug=1 optimize=0 and ./scons debug=1 optimize=1
both build and Swift runs in both configurations on
Windows 8 with VS 2013.

Change-Id: I47d75916963c4e64732c547bc7dfb322096d6189

diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index 597690d..8379a58 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -248,11 +248,8 @@ if env["debug"] :
             env["PDB"] = '${TARGET.base}.pdb'
         if env["set_iterator_debug_level"] :
             env.Append(CPPDEFINES = ["_ITERATOR_DEBUG_LEVEL=0"])
-        if env["optimize"] :
-            env.Append(LINKFLAGS = ["/OPT:NOREF"])
-            env.Append(CCFLAGS = ["/MD"])
-        else :
-            env.Append(CCFLAGS = ["/MDd"])
+        env.Append(LINKFLAGS = ["/OPT:NOREF"])
+        env.Append(CCFLAGS = ["/MD"])
     else :
         env.Append(CCFLAGS = ["-g"])
 elif env["PLATFORM"] == "win32" :
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index 777797c..200bd58 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -78,8 +78,6 @@ if env["PLATFORM"] == "win32" :
     if myenv.get("HAVE_SCHANNEL", 0) :
         myenv.Append(LIBS = "Cryptui")
         myenv.Append(CPPDEFINES = "HAVE_SCHANNEL")
-        if env["debug"] and not env["optimize"]:
-            myenv.Append(LINKFLAGS = ["/NODEFAULTLIB:msvcrt"])
 
 myenv.WriteVal("DefaultTheme.qrc", myenv.Value(generateQRCTheme(myenv.Dir("#/Swift/resources/themes/Default"), "Default")))
 
-- 
cgit v0.10.2-6-g49f6