diff options
Diffstat (limited to 'BuildTools/SCons/SConscript.boot')
-rw-r--r-- | BuildTools/SCons/SConscript.boot | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot index d603ef4..f815bbc 100644 --- a/BuildTools/SCons/SConscript.boot +++ b/BuildTools/SCons/SConscript.boot @@ -315,78 +315,82 @@ if not env["assertions"] : # disable file-transfer support on iOS if env["target"] in ["iphone-device", "iphone-simulator", "xcode"] : env["experimental_ft"] = False if env["experimental_ft"] : env.Append(CPPDEFINES = ["SWIFT_EXPERIMENTAL_FT"]) if env["experimental"] : env.Append(CPPDEFINES = ["SWIFT_EXPERIMENTAL_HISTORY", "SWIFT_EXPERIMENTAL_WB"]) # If we build shared libs on AMD64, we need -fPIC. # This should have no performance impact om AMD64 if env["PLATFORM"] == "posix" and platform.machine() in ["x86_64", "amd64"] : env.Append(CCFLAGS = ["-fPIC"]) # Warnings if env["PLATFORM"] == "win32" : env.Append(CXXFLAGS = ["/wd4068"]) env.Append(CXXFLAGS = ["/wd4503"]) # Disable 'decorated name length exceeded, name was truncated' warning if not env.get("allow_warnings", "False") : env.Append(CXXFLAGS = ["/WX"]) elif env["PLATFORM"] == "hpux" : # HP-UX gives a flood of minor warnings if this is enabled #env.Append(CXXFLAGS = ["+w"]) pass 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 "-Wno-unknown-pragmas", # To stay compatible between CLang versions "-Wno-weak-vtables", # Virtually none of our elements have outlined methods. This also seems to affect classes in .cpp files, which in turn affects all our tests, which may need fixing in CLang "-Wno-shadow", # Also warns for shadowing on constructor arguments, which we do a lot "-Wno-documentation", # We don't care about documentation warnings "-Wno-documentation-unknown-command", # We don't care about documentation warnings "-Wno-exit-time-destructors", # Used a lot in e.g. CPPUnit "-Wno-c++98-compat-pedantic", # We do different things that violate this, but they could be fixed "-Wno-global-constructors", # We depend on this for e.g. string constants "-Wno-disabled-macro-expansion", # Caused due to system headers "-Wno-long-long", # We use long long "-Wno-padded", "-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-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 + "-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"]) gccVersion = env.get("CCVERSION", "0.0.0").split(".") if gccVersion >= ["4", "5", "0"] and not "clang" in env["CC"] : env.Append(CXXFLAGS = ["-Wlogical-op"]) if not env.get("allow_warnings", False) : env.Append(CXXFLAGS = ["-Werror"]) if env.get("coverage", 0) : assert(env["PLATFORM"] != "win32") env.Append(CCFLAGS = ["-fprofile-arcs", "-ftest-coverage"]) env.Append(LINKFLAGS = ["-fprofile-arcs", "-ftest-coverage"]) if env["PLATFORM"] == "win32" : env.Append(LIBS = ["user32", "crypt32", "dnsapi", "iphlpapi", "ws2_32", "wsock32", "Advapi32", "ntdsapi"]) env.Append(CCFLAGS = ["/EHsc", "/nologo", "/Zm256"]) env.Append(LINKFLAGS = ["/INCREMENTAL:no", "/NOLOGO"]) if int(env["MSVS_VERSION"].split(".")[0]) < 10 : mt = env.get('mt') if not mt: mt = 'mt.exe' env["LINKCOM"] = [env["LINKCOM"], '%s -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;1' % mt] env["SHLINKCOM"] = [env["SHLINKCOM"], '%s -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;2' % mt] if env["PLATFORM"] == "darwin" and not env["target"] in ["iphone-device", "iphone-simulator", "xcode", "android"] : env["PLATFORM_FLAGS"]["FRAMEWORKS"] += ["IOKit", "AppKit", "SystemConfiguration", "Security", "SecurityInterface"] # Required by boost headers on HP-UX if env["PLATFORM"] == "hpux" : |