summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'BuildTools/SCons/SConscript.boot')
-rw-r--r--BuildTools/SCons/SConscript.boot16
1 files changed, 11 insertions, 5 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index 3b21dde..411fb7d 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -39,3 +39,4 @@ if os.name == "mac" or (os.name == "posix" and os.uname()[0] == "Darwin"):
if os.name == "nt" :
- vars.Add(PathVariable("vcredist", "MSVC redistributable dir", None, PathVariable.PathAccept))
+ vars.Add(PathVariable("vcredist", "MSVC redistributable path", None, PathVariable.PathAccept))
+ vars.Add(PathVariable("vcredistdir", "MSVC redistributable dir", None, PathVariable.PathAccept))
if os.name == "nt" :
@@ -109,2 +110,3 @@ vars.Add(BoolVariable("experimental", "Build experimental features", "no"))
vars.Add(BoolVariable("set_iterator_debug_level", "Set _ITERATOR_DEBUG_LEVEL=0", "yes"))
+vars.Add(EnumVariable("msvc_runtime", "Choose MSVC runtime library", "MD", ["MT", "MTd", "MD", "MDd"]))
vars.Add(BoolVariable("unbound", "Build bundled ldns and unbound. Use them for DNS lookup.", "no"))
@@ -251,2 +253,5 @@ env["OBJCCFLAGS"] = []
+if env["PLATFORM"] != "win32" :
+ env.AppendUnique(CCFLAGS=['-isystem', Dir('#').abspath + '/Backport/'])
+
# Compile code as C++11
@@ -274,7 +279,9 @@ if env["debug"] :
env.Append(LINKFLAGS = ["/OPT:NOREF"])
- env.Append(CCFLAGS = ["/MD"])
else :
env.Append(CCFLAGS = ["-g"])
-elif env["PLATFORM"] == "win32" :
- env.Append(CCFLAGS = ["/MD"])
+
+if env["PLATFORM"] == "win32" :
+ env.AppendUnique(CCFLAGS = ["/{}".format(env.get("msvc_runtime"))])
+ # debug builds against debug MSVC runtime can cause some more sections in the object file
+ env.AppendUnique(CCFLAGS = ["/bigobj"])
@@ -365,3 +372,2 @@ else :
- "-Wno-inconsistent-missing-destructor-override", # FIXME: fix source code issues regarding this warning later
"-Wno-shadow-field", # FIXME: fix source code issues regarding this warning later