diff options
Diffstat (limited to 'BuildTools/SCons/SConscript.boot')
-rw-r--r-- | BuildTools/SCons/SConscript.boot | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot index d603ef4..7b29c06 100644 --- a/BuildTools/SCons/SConscript.boot +++ b/BuildTools/SCons/SConscript.boot @@ -37,7 +37,8 @@ if os.name == "mac" or (os.name == "posix" and os.uname()[0] == "Darwin"): vars.Add(BoolVariable("mac105", "Link against the 10.5 frameworks", "no")) vars.Add(BoolVariable("mac106", "Link against the 10.6 frameworks", "no")) 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" : vars.Add(PathVariable("wix_bindir", "Path to WiX binaries", "", PathVariable.PathAccept)) if os.name == "nt" : @@ -53,6 +54,7 @@ vars.Add(PathVariable("boost_includedir", "Boost headers location", None, PathVa vars.Add(PathVariable("boost_libdir", "Boost library location", None, PathVariable.PathAccept)) vars.Add(BoolVariable("boost_bundled_enable", "Allow use of bundled Boost as last resort", "true")) vars.Add(BoolVariable("boost_force_bundled", "Force use of bundled Boost.", False)) +vars.Add(BoolVariable("allow_boost_1_64", "Allow use of Boost 1.64", False)) vars.Add(PathVariable("zlib_includedir", "Zlib headers location", None, PathVariable.PathAccept)) vars.Add(PathVariable("zlib_libdir", "Zlib library location", None, PathVariable.PathAccept)) vars.Add(PathVariable("zlib_libfile", "Zlib library file (full path to file)", None, PathVariable.PathAccept)) @@ -106,10 +108,12 @@ vars.Add(BoolVariable("enable_variants", "Build in a separate dir under build/, 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")) # Code Signing Options vars.Add("codesign_identity", "macOS code signing identity to be passed to codesign when building the distribution package. Must match the Commen Name of the Subject of the code signing certificate.", "") @@ -128,6 +132,7 @@ env_ENV = { 'PATH' : os.environ['PATH'], 'LD_LIBRARY_PATH' : os.environ.get("LD_LIBRARY_PATH", ""), 'TERM' : os.environ.get("TERM", ""), + 'SDKROOT' : os.environ.get("SDKROOT", ""), } if "MSVC_VERSION" in ARGUMENTS : @@ -247,6 +252,9 @@ for flags_type in ["ccflags", "cxxflags", "linkflags"] : # where you need it env["OBJCCFLAGS"] = [] +if env["PLATFORM"] != "win32" : + env.AppendUnique(CCFLAGS=['-isystem', Dir('#').abspath + '/Backport/']) + # Compile code as C++11 if env["PLATFORM"] != "win32" : env.Append(CXXFLAGS = ["-std=c++11"]) @@ -270,11 +278,13 @@ if env["debug"] : 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"))]) + # debug builds against debug MSVC runtime can cause some more sections in the object file + env.AppendUnique(CCFLAGS = ["/bigobj"]) if env.get("universal", 0) : assert(env["PLATFORM"] == "darwin") @@ -342,7 +352,7 @@ elif env["PLATFORM"] == "sunos" : #env.Append(CXXFLAGS = ["-z verbose"]) pass else : - if os.path.basename(env["CXX"]) in ["clang", "clang++"] : + if os.path.basename(env["CXX"]).startswith(("clang", "clang++")) : env.Append(CXXFLAGS = [ "-Weverything", "-Wno-unknown-warning-option", # To stay compatible between CLang versions @@ -360,6 +370,9 @@ else : "-Wno-missing-variable-declarations", # Getting rid of CPPUnit warnings "-Wno-direct-ivar-access", # Obj-C code warning "-Wno-potentially-evaluated-expression", # Caused due to calling shared_ptr::get() inside typeid() + + "-Wno-shadow-field", # FIXME: fix source code issues regarding this warning later + "-Wno-unused-template", # FIXME: fix source code issues regarding this warning later ]) else : env.Append(CXXFLAGS = ["-Wextra", "-Wall", "-Wnon-virtual-dtor", "-Wundef", "-Wold-style-cast", "-Wno-long-long", "-Woverloaded-virtual", "-Wfloat-equal", "-Wredundant-decls", "-Wno-unknown-pragmas"]) @@ -420,6 +433,8 @@ for path in ["SWIFT_INSTALLDIR", "SWIFTEN_INSTALLDIR", "SLUIFT_INSTALLDIR"] : env[path] = Dir(ARGUMENTS[path]).abspath else : env[path] = Dir("#/" + ARGUMENTS[path]).abspath +if ARGUMENTS.get("SWIFTEN_LIBDIR", "") : + env["SWIFTEN_LIBDIR"] = ARGUMENTS["SWIFTEN_LIBDIR"] ################################################################################ |