summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-07-10 07:58:49 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-07-10 10:56:44 (GMT)
commit3911f30a92ae971aebdbf1d733b4261aafde4950 (patch)
treeeaa21ace7c329130b1aa5ab8b7494156d6eed4b9 /BuildTools/SCons/SConscript.boot
parent17721d86205828929e784ad35e5f07e8a7a71631 (diff)
downloadswift-3911f30a92ae971aebdbf1d733b4261aafde4950.zip
swift-3911f30a92ae971aebdbf1d733b4261aafde4950.tar.bz2
Fixed compilation problem on some compilers.
Diffstat (limited to 'BuildTools/SCons/SConscript.boot')
-rw-r--r--BuildTools/SCons/SConscript.boot15
1 files changed, 7 insertions, 8 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index c57ba3c..e969def 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -50,6 +50,7 @@ vars.Add(PathVariable("avahi_libdir", "Avahi library location", None, PathVariab
vars.Add(PathVariable("qt", "Qt location", "", PathVariable.PathAccept))
vars.Add(PathVariable("docbook_xml", "DocBook XML", None, PathVariable.PathAccept))
vars.Add(PathVariable("docbook_xsl", "DocBook XSL", None, PathVariable.PathAccept))
+vars.Add(BoolVariable("build_examples", "Build example programs", "yes"))
vars.Add(BoolVariable("enable_variants", "Build in a separate dir under build/, depending on compile flags", "no"))
################################################################################
@@ -81,12 +82,6 @@ if env["PLATFORM"] == "win32" :
env['ENV']['TMP'] = os.environ['TMP']
env.Tool("SLOCCount", toolpath = ["#/BuildTools/SCons/Tools"])
-# Override SConscript to handle tests
-oldSConscript = SConscript
-def SConscript(*arguments, **keywords) :
- if not keywords.get("test_only", False) or env["TEST"] :
- return apply(oldSConscript, arguments, keywords)
-
# Max out the number of jobs
if env["max_jobs"] :
try :
@@ -289,8 +284,12 @@ Export("conf_env")
variant = ""
if env["enable_variants"] :
- fingerprint = "".join([flag for flag in env["CXXFLAGS"] + env["CCFLAGS"] if not flag.startswith("-W")])
+ fingerprint = ",".join([flag for flag in env["CXXFLAGS"] + env["CCFLAGS"] if not flag.startswith("-W") and not flag.startswith("-fvisibility")])
variant = "build/" + fingerprint
-
+ if not os.path.exists(Dir("#/build").abspath) :
+ os.mkdir(Dir("#/build").abspath)
+ if os.path.exists(Dir("#/build/current").abspath) :
+ os.unlink(Dir("#/build/current").abspath)
+ os.symlink(os.path.basename(variant), Dir("#/build/current").abspath)
Return("variant")