summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-11-27 13:14:26 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-11-27 13:20:34 (GMT)
commit80e538bde9d431cd13a1aba4b868de2fa169b746 (patch)
tree90d4db29e9c597991b0fb2fab34f22b4e6ac6239 /BuildTools/SCons/SConstruct
parent876ef43209a2d12f128b9258e9184c13ef8e8f10 (diff)
downloadswift-contrib-80e538bde9d431cd13a1aba4b868de2fa169b746.zip
swift-contrib-80e538bde9d431cd13a1aba4b868de2fa169b746.tar.bz2
Split incoming ccflags if they are a string.
Diffstat (limited to 'BuildTools/SCons/SConstruct')
-rw-r--r--BuildTools/SCons/SConstruct10
1 files changed, 8 insertions, 2 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 8e06b4c..52ea75d 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -104,7 +104,13 @@ if "cc" in env :
env["CC"] = env["cc"]
if "cxx" in env :
env["CXX"] = env["cxx"]
-env["CCFLAGS"] = env.get("ccflags", [])
+ccflags = env.get("ccflags", [])
+if isinstance(ccflags, str) :
+ # FIXME: Make the splitting more robust
+ env["CCFLAGS"] = ccflags.split(" ")
+else :
+ env["CCFLAGS"] = ccflags
+print env["ccflags"]
if "link" in env :
env["SHLINK"] = env["link"]
env["LINK"] = env["link"]
@@ -113,7 +119,7 @@ env["LINKFLAGS"] = env.get("linkflags", [])
# where you need it
env["OBJCCFLAGS"] = []
if env["optimize"] :
- env.Append(CCFLAGS = "-O2")
+ env.Append(CCFLAGS = ["-O2"])
if env["PLATFORM"] == "win32" :
env.Append(CCFLAGS = ["GL"])
env.Append(LINKFLAGS = ["/INCREMENTAL:NO", "/LTCG"])