summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-07-12 19:55:08 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-07-12 21:06:48 (GMT)
commitd0171b0d632893e5574c8f7de2f7582efe18d65b (patch)
tree10cf497ae7870b3336c7291209ca2461d9c7af48
parent0bdc7b1d043e681c18e2d0fffe1de20eab2ee0b3 (diff)
downloadswift-contrib-d0171b0d632893e5574c8f7de2f7582efe18d65b.zip
swift-contrib-d0171b0d632893e5574c8f7de2f7582efe18d65b.tar.bz2
Disable incremental link on Windows.
-rw-r--r--BuildTools/SCons/SConscript.boot5
1 files changed, 3 insertions, 2 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index 16c05c3..d6d4e29 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -121,22 +121,23 @@ if "link" in env :
linkflags = env.get("linkflags", [])
if isinstance(linkflags, str) :
# FIXME: Make the splitting more robust
env["LINKFLAGS"] = linkflags.split(" ")
else :
env["LINKFLAGS"] = linkflags
# This isn't a real flag (yet) AFAIK. Be sure to append it to the CXXFLAGS
# where you need it
env["OBJCCFLAGS"] = []
+
if env["optimize"] :
if env["PLATFORM"] == "win32" :
env.Append(CCFLAGS = ["/O2", "/GL"])
- env.Append(LINKFLAGS = ["/INCREMENTAL:NO", "/LTCG"])
+ env.Append(LINKFLAGS = ["/LTCG"])
else :
env.Append(CCFLAGS = ["-O2"])
if env["target"] == "xcode" and os.environ["CONFIGURATION"] == "Release" :
env.Append(CCFLAGS = ["-Os"])
if env["debug"] :
if env["PLATFORM"] == "win32" :
env.Append(CCFLAGS = ["/Zi", "/MDd"])
@@ -204,19 +205,19 @@ else :
if env.get("coverage", 0) :
assert(env["PLATFORM"] != "win32")
env.Append(CCFLAGS = ["-fprofile-arcs", "-ftest-coverage"])
env.Append(LINKFLAGS = ["-fprofile-arcs", "-ftest-coverage"])
if env["PLATFORM"] == "win32" :
env.Append(LIBS = ["user32", "crypt32", "dnsapi", "iphlpapi", "ws2_32", "wsock32", "Advapi32"])
env.Append(CCFLAGS = ["/EHsc", "/nologo"])
- # FIXME: We should find a decent solution for MSVS 10
+ env.Append(LINKFLAGS = ["/INCREMENTAL:no"])
if int(env["MSVS_VERSION"].split(".")[0]) < 10 :
env["LINKCOM"] = [env["LINKCOM"], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;1']
env["SHLINKCOM"] = [env["SHLINKCOM"], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;2']
if env["PLATFORM"] == "darwin" and not env["target"] in ["iphone-device", "iphone-simulator", "xcode"] :
env.Append(FRAMEWORKS = ["IOKit", "AppKit", "SystemConfiguration", "Security", "SecurityInterface"])
# Testing
env["TEST_TYPE"] = env["test"]