diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-07-09 21:44:49 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-07-09 21:45:36 (GMT) |
commit | 2c93184a54c3efd048c27494b65cfa3e9629cebb (patch) | |
tree | c3825981900790adb390d33144f0872ee371aa47 /BuildTools/SCons | |
parent | 1c2cd11645b33aadee31c37e15f4a24d6ae37587 (diff) | |
download | swift-contrib-2c93184a54c3efd048c27494b65cfa3e9629cebb.zip swift-contrib-2c93184a54c3efd048c27494b65cfa3e9629cebb.tar.bz2 |
Set CCache flags last in the compile settings.
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r-- | BuildTools/SCons/SConstruct | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index 4a4f9ab..2f85786 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -105,13 +105,6 @@ if env.get("distcc", False) : env["ENV"]["DISTCC_HOSTS"] = env["distcc_hosts"] env["CC"] = "distcc gcc" env["CXX"] = "distcc g++" -if env.get("ccache", False) : - env["ENV"]["HOME"] = os.environ["HOME"] - for var in os.environ : - if var.startswith("CCACHE_") : - env["ENV"][var] = os.environ[var] - env["CC"] = "ccache gcc" - env["CXX"] = "ccache g++" if "cc" in env : env["CC"] = env["cc"] if "cxx" in env : @@ -277,6 +270,21 @@ if target in ["iphone-device", "iphone-simulator", "xcode"] : # Bit of a hack, because BOOST doesn't know the endianness for ARM env.Append(CPPDEFINES = ["_LITTLE_ENDIAN"]) +# CCache +if env.get("ccache", False) : + env["ENV"]["HOME"] = os.environ["HOME"] + for var in os.environ : + if var.startswith("CCACHE_") : + env["ENV"][var] = os.environ[var] + if env.get("CC", "") != "" : + env["CC"] = "ccache " + env["CC"] + else : + env["CC"] = "ccache gcc" + if env.get("CXX", "") != "" : + env["CXX"] = "ccache " + env["CXX"] + else : + env["CC"] = "ccache g++" + conf_env = env.Clone() Export("env") |