summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2017-06-19 10:17:40 (GMT)
committerTobias Markmann <tm@ayena.de>2017-06-21 15:56:21 (GMT)
commit44917c5f63ee2373b65911ea953d19fc0d1f3272 (patch)
treeaf296ec2eef9197e337fefc9a559b2ca3e683d5b /BuildTools/SCons/SConscript.boot
parent027111dcd9f5812342066d3bd3e1dbb1f46b3c95 (diff)
downloadswift-44917c5f63ee2373b65911ea953d19fc0d1f3272.zip
swift-44917c5f63ee2373b65911ea953d19fc0d1f3272.tar.bz2
Add CircleCI configuration for basic GitHub PR checks
This also disables a couple compiler warnings raised by clang trunk. Test-Information: Tested this on my personal GitHub fork of Swift and it works. Change-Id: I646d3beb9fc0376e0b38ce8e323e5717a899ad45
Diffstat (limited to 'BuildTools/SCons/SConscript.boot')
-rw-r--r--BuildTools/SCons/SConscript.boot6
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" :