summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-15 15:55:57 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-15 15:55:57 (GMT)
commitc754f5bf313f6c6db02703ca5bd9eb5c679f66d4 (patch)
tree5572d0188eaa50c726b6c608818ad0246223c55d /BuildTools
parent48a317147b77fa7a7da571e5d47c66f4152269c4 (diff)
downloadswift-c754f5bf313f6c6db02703ca5bd9eb5c679f66d4.zip
swift-c754f5bf313f6c6db02703ca5bd9eb5c679f66d4.tar.bz2
Fixed optimize compilation flags on Windows.
Diffstat (limited to 'BuildTools')
-rw-r--r--BuildTools/SCons/SConstruct12
1 files changed, 9 insertions, 3 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 5952629..1388615 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -123,10 +123,11 @@ env["LINKFLAGS"] = env.get("linkflags", [])
# where you need it
env["OBJCCFLAGS"] = []
if env["optimize"] :
- env.Append(CCFLAGS = ["-O2"])
if env["PLATFORM"] == "win32" :
- env.Append(CCFLAGS = ["GL"])
+ env.Append(CCFLAGS = ["/O2", "/GL"])
env.Append(LINKFLAGS = ["/INCREMENTAL:NO", "/LTCG"])
+ else :
+ env.Append(CCFLAGS = ["-O2"])
if env["debug"] :
if env["PLATFORM"] == "win32" :
@@ -336,7 +337,12 @@ boost_flags = {}
if env.get("boost_libdir", None) :
boost_flags["LIBPATH"] = [env["boost_libdir"]]
if env.get("boost_includedir", None) :
- boost_flags["CPPPATH"] = [env["boost_includedir"]]
+ if env["PLATFORM"] == "win32" :
+ boost_flags["CPPPATH"] = [env["boost_includedir"]]
+ else :
+ # Using isystem to avoid getting warnings from a system boost
+ # Unfortunately, this also disables dependency tracking
+ boost_flags["CPPFLAGS"] = [("-isystem", env["boost_includedir"])]
boost_conf_env.MergeFlags(boost_flags)
conf = Configure(boost_conf_env)
boostLibs = [("signals", None), ("thread", None), ("regex", None), ("program_options", None), ("filesystem", None), ("system", "system/system_error.hpp"), ("date_time", "date_time/date.hpp")]