summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-25 19:22:58 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-25 19:22:58 (GMT)
commit258232604c0f84a5edb95d7d74b65326a57a3398 (patch)
tree7417085df0cc2dba59803a271bb63d5e797def87 /BuildTools
parente06148804fbe7598d9b0bb556411be542494a11b (diff)
downloadswift-258232604c0f84a5edb95d7d74b65326a57a3398.zip
swift-258232604c0f84a5edb95d7d74b65326a57a3398.tar.bz2
Use -fPIC on AMD64.
Diffstat (limited to 'BuildTools')
-rw-r--r--BuildTools/SCons/SConstruct6
1 files changed, 5 insertions, 1 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 772b485..af2d747 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -1,4 +1,4 @@
-import sys, os, re
+import sys, os, re, platform
sys.path.append(Dir("BuildTools/SCons").abspath)
import SCons.SConf
@@ -161,6 +161,10 @@ if env.get("mac105", 0) :
"-isysroot", "/Developer/SDKs/MacOSX10.5.sdk",
"-arch", "i386"])
+# If we build shared libs on AMD64, we need -fPIC.
+# This should have no performance impact om AMD64
+if env["PLATFORM"] == "posix" and platform.machine() == "x86_64" :
+ env.Append(CCFLAGS = ["-fPIC"])
# Warnings
if env["PLATFORM"] == "win32" :