diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-12-31 10:36:57 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-12-31 10:36:57 (GMT) |
commit | ee8e6018640754bfca99605e9752c9053777f43a (patch) | |
tree | fe7d0c5960b9fa65e13ecf1cae9b3c96caa8098e /BuildTools/SCons | |
parent | 69d5515110bba3803ef37dd470d690b7b8aac9ae (diff) | |
download | swift-ee8e6018640754bfca99605e9752c9053777f43a.zip swift-ee8e6018640754bfca99605e9752c9053777f43a.tar.bz2 |
Add scan-build support.
Change-Id: Ife69d84147946b41875792cb90189542c3130bc3
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r-- | BuildTools/SCons/SConscript.boot | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot index d218d9a..2ca5281 100644 --- a/BuildTools/SCons/SConscript.boot +++ b/BuildTools/SCons/SConscript.boot @@ -118,6 +118,14 @@ if env["PLATFORM"] == "darwin" : if platform.machine() == "x86_64" : env.Append(LINKFLAGS = ["-arch", "x86_64"]) +# Check whether we are running inside scan-build, and override compiler if so +if "CCC_ANALYZER_HTML" in os.environ : + for key, value in os.environ.items() : + if key.startswith("CCC_") or key.startswith("CLANG") : + env["ENV"][key] = value + env["CC"] = os.environ["CC"] + env["CXX"] = os.environ["CXX"] + # Override the compiler with custom variables set at config time if "cc" in env : env["CC"] = env["cc"] |