diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-11-27 13:14:26 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-11-27 13:20:34 (GMT) |
commit | 80e538bde9d431cd13a1aba4b868de2fa169b746 (patch) | |
tree | 90d4db29e9c597991b0fb2fab34f22b4e6ac6239 | |
parent | 876ef43209a2d12f128b9258e9184c13ef8e8f10 (diff) | |
download | swift-80e538bde9d431cd13a1aba4b868de2fa169b746.zip swift-80e538bde9d431cd13a1aba4b868de2fa169b746.tar.bz2 |
Split incoming ccflags if they are a string.
-rw-r--r-- | BuildTools/SCons/SConstruct | 10 |
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"]) |