diff options
author | Joanna Hulboj <joanna.hulboj@isode.com> | 2017-04-28 13:52:47 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2017-07-07 16:23:08 (GMT) |
commit | f68d574ff04162e98e16a636c66ab6de5960e875 (patch) | |
tree | 0248d9450a8bb6aa6731067d9f921791d9d4deaa /BuildTools/SCons | |
parent | d89b27b8796f89c847c280dacfb1b09fd6cb6731 (diff) | |
download | swift-f68d574ff04162e98e16a636c66ab6de5960e875.zip swift-f68d574ff04162e98e16a636c66ab6de5960e875.tar.bz2 |
Make std:: make_unique available in gcc with c++11
Test-Information:
Unit tests pass OK on Windows 10 and CentOS 7.3.
Change-Id: I33c9eb6b3e6409727350a44e6d5c88c5e8907275
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r-- | BuildTools/SCons/SConscript.boot | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot index f815bbc..4c68076 100644 --- a/BuildTools/SCons/SConscript.boot +++ b/BuildTools/SCons/SConscript.boot @@ -220,60 +220,63 @@ if "CCC_ANALYZER_HTML" in os.environ : for key, value in os.environ.items() : if key.startswith("CCC_") or key.startswith("CLANG") : env["ENV"][key] = value env["CC"] = os.environ["CC"] env["CXX"] = os.environ["CXX"] # Override the compiler with custom variables set at config time if "cc" in env : env["CC"] = env["cc"] if "cxx" in env : env["CXX"] = env["cxx"] if "ar" in env : env["AR"] = env["ar"] if "link" in env : env["SHLINK"] = env["link"] env["LINK"] = env["link"] # Process user-defined external flags for flags_type in ["ccflags", "cxxflags", "linkflags"] : if flags_type in env : if isinstance(env[flags_type], str) : # FIXME: Make the splitting more robust env[flags_type.upper()] = env[flags_type].split(" ") else : env[flags_type.upper()] = env[flags_type] # This isn't a real flag (yet) AFAIK. Be sure to append it to the CXXFLAGS # 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"]) if env["optimize"] : if env["PLATFORM"] == "win32" : env.Append(CCFLAGS = ["/O2"]) else : env.Append(CCFLAGS = ["-O2"]) if env["target"] == "xcode" and os.environ["CONFIGURATION"] == "Release" : env.Append(CCFLAGS = ["-Os"]) if env["debug"] : if env["PLATFORM"] == "win32" : env.Append(CCFLAGS = ["/Zi"]) env.Append(LINKFLAGS = ["/DEBUG"]) if GetOption("num_jobs") > 1 : 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.get("universal", 0) : |