summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-11-28 09:48:01 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-11-28 09:48:01 (GMT)
commit34eb7f55fbdd1566ee117738f3a423354ce1b45c (patch)
treeb239d9b7966f0b18e39aeeed3c1c76e720760f3c /BuildTools
parent48ffe88bf768fd762a3bcb52717a9079ec803de5 (diff)
downloadswift-34eb7f55fbdd1566ee117738f3a423354ce1b45c.zip
swift-34eb7f55fbdd1566ee117738f3a423354ce1b45c.tar.bz2
Replace slightly-too-magic MergeFlags by our own UseFlags.
Diffstat (limited to 'BuildTools')
-rw-r--r--BuildTools/SCons/SConstruct3
-rw-r--r--BuildTools/SCons/Tools/Flags.py10
2 files changed, 12 insertions, 1 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 31d74fa..bdb7d48 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -47,7 +47,7 @@ vars.Add(PathVariable("docbook_xsl", "DocBook XSL", None, PathVariable.PathAccep
# Set up default build & configure environment
################################################################################
-env = Environment(CPPPATH = "#", ENV = {
+env = Environment(CPPPATH = ["#"], ENV = {
'PATH' : os.environ['PATH'],
'LD_LIBRARY_PATH' : os.environ.get("LD_LIBRARY_PATH", ""),
}, variables = vars)
@@ -61,6 +61,7 @@ env["PLATFORM_FLAGS"] = {}
env.Tool("Test", toolpath = ["#/BuildTools/SCons/Tools"])
env.Tool("WriteVal", toolpath = ["#/BuildTools/SCons/Tools"])
env.Tool("BuildVersion", toolpath = ["#/BuildTools/SCons/Tools"])
+env.Tool("Flags", toolpath = ["#/BuildTools/SCons/Tools"])
if env["PLATFORM"] == "darwin" :
env.Tool("Nib", toolpath = ["#/BuildTools/SCons/Tools"])
env.Tool("AppBundle", toolpath = ["#/BuildTools/SCons/Tools"])
diff --git a/BuildTools/SCons/Tools/Flags.py b/BuildTools/SCons/Tools/Flags.py
new file mode 100644
index 0000000..13fbb32
--- /dev/null
+++ b/BuildTools/SCons/Tools/Flags.py
@@ -0,0 +1,10 @@
+import SCons.Util
+
+def generate(env) :
+ def useFlags(env, flags) :
+ for flag in flags :
+ env[flag] = env.get(flag, []) + flags[flag]
+ env.AddMethod(useFlags, "UseFlags")
+
+def exists(env) :
+ return True