summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-12-30 18:35:46 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-12-30 18:55:58 (GMT)
commitf5f7dcf14732d6075b89a5638f9d72f10b8d35c9 (patch)
tree926cc553cc170912d823b98e9555570065144abd
parent96b31c598f5c229c3acc0579ddfe22dd503e2b9d (diff)
downloadswift-f5f7dcf14732d6075b89a5638f9d72f10b8d35c9.zip
swift-f5f7dcf14732d6075b89a5638f9d72f10b8d35c9.tar.bz2
Rearrange warning options.
Change-Id: Ibe78f592cc9278e149541ad3e9499bd1fb198671
-rw-r--r--BuildTools/SCons/SConscript.boot15
1 files changed, 8 insertions, 7 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index e4071be..d218d9a 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -215,13 +215,7 @@ if env["PLATFORM"] == "win32" :
#env.Append(CCFLAGS = ["/Wall"])
pass
else :
- env.Append(CXXFLAGS = ["-Wextra", "-Wall", "-Wnon-virtual-dtor", "-Wundef", "-Wold-style-cast", "-Wno-long-long", "-Woverloaded-virtual", "-Wfloat-equal", "-Wredundant-decls"])
- if not env.get("allow_warnings", False) :
- env.Append(CXXFLAGS = ["-Werror"])
- 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 "clang" in env["CC"] :
+ if "clang" in env["CXX"] :
env.Append(CXXFLAGS = [
"-Weverything",
"-Wno-sign-conversion", # We have this a lot. Not sure if we should allow this or not.
@@ -232,6 +226,13 @@ else :
"-Wno-global-constructors",
"-Wno-padded",
])
+ 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")