diff options
| author | Tobias Markmann <tm@ayena.de> | 2018-10-01 10:11:31 (GMT) |
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2018-10-01 12:11:25 (GMT) |
| commit | d2f67c83aa40f2a273f17c13c6c3ea94f7f73c25 (patch) | |
| tree | e21d86b747da42fc9214963e994f6767c472d7ee /BuildTools/SCons | |
| parent | 78373f300882ebad10eda79eab7ee1e8a8d82b93 (diff) | |
| download | swift-d2f67c83aa40f2a273f17c13c6c3ea94f7f73c25.zip swift-d2f67c83aa40f2a273f17c13c6c3ea94f7f73c25.tar.bz2 | |
Add ability to specify MSVC runtime library
Test-Information:
Builds in default configuration on Windows 10 with MSVS 2015.
Change-Id: I82e6a317820168d471694c8ee1f33b652515c0d9
Diffstat (limited to 'BuildTools/SCons')
| -rw-r--r-- | BuildTools/SCons/SConscript.boot | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot index 40f2425..80831a1 100644 --- a/BuildTools/SCons/SConscript.boot +++ b/BuildTools/SCons/SConscript.boot @@ -106,10 +106,11 @@ vars.Add(PathVariable("docbook_xsl", "DocBook XSL", None, PathVariable.PathAccep vars.Add(BoolVariable("build_examples", "Build example programs", "yes")) vars.Add(BoolVariable("enable_variants", "Build in a separate dir under build/, depending on compile flags", "no")) vars.Add(BoolVariable("experimental_ft", "Build experimental file transfer", "yes")) 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")) vars.Add(BoolVariable("check_headers", "Independently build compilation units for all Swiften headers for detecting missing dependencies.", "no")) vars.Add("win_target_arch", "Target architecture for Windows builds. x86 for 32-bit (default) or x86_64 for 64-bit.", "x86") vars.Add(BoolVariable("install_git_hooks", "Install git hooks", "true")) vars.Add(BoolVariable("help2man", "Run help2man to geneate man pages", "false")) @@ -274,15 +275,15 @@ if env["debug"] : env["CCPDBFLAGS"] = '/Fd${TARGET}.pdb' env["PDB"] = '${TARGET.base}.pdb' if env["set_iterator_debug_level"] : env.Append(CPPDEFINES = ["_ITERATOR_DEBUG_LEVEL=0"]) 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"))]) if env.get("universal", 0) : assert(env["PLATFORM"] == "darwin") env.Append(CCFLAGS = [ "-isysroot", "/Developer/SDKs/MacOSX10.4u.sdk", |
Swift