aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcelofg552016-05-20 17:31:30 -0300
committerRémi Verschelde2016-06-04 22:20:02 +0200
commit4dc2d78d2e939ce07768c83ed18cf978292cffc4 (patch)
tree5b589e60760a97ae61f5eeeb3c750ac153c4b47a
parentc2f48421d1dbb747d3c5c7b77f6bbe07ef97d0a8 (diff)
downloadgodot-4dc2d78d2e939ce07768c83ed18cf978292cffc4.tar.gz
godot-4dc2d78d2e939ce07768c83ed18cf978292cffc4.tar.zst
godot-4dc2d78d2e939ce07768c83ed18cf978292cffc4.zip
Added 'fat' option for bits param on scons for osx, this will produce a fat binary that contains both 32 bits and 64 bits binaries
(cherry picked from commit eeb83982e2eb4b70e43d45f9fdfe5a54f08576eb)
-rw-r--r--SConstruct4
-rw-r--r--platform/osx/detect.py5
2 files changed, 7 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index 3ea40489b..8a3a7c456 100644
--- a/SConstruct
+++ b/SConstruct
@@ -117,7 +117,7 @@ if profile:
opts=Variables(customs, ARGUMENTS)
opts.Add('target', 'Compile Target (debug/release_debug/release).', "debug")
-opts.Add('bits', 'Compile Target Bits (default/32/64).', "default")
+opts.Add('bits', 'Compile Target Bits (default/32/64/fat).', "default")
opts.Add('platform','Platform: '+str(platform_list)+'.',"")
opts.Add('p','Platform (same as platform=).',"")
opts.Add('tools','Build Tools (Including Editor): (yes/no)','yes')
@@ -276,6 +276,8 @@ if selected_platform in platform_list:
suffix+=".32"
elif (env["bits"]=="64"):
suffix+=".64"
+ elif (env["bits"]=="fat"):
+ suffix+=".fat"
suffix+=env.extra_suffix
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index 1f176dc22..28bc42f6b 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -68,9 +68,12 @@ def configure(env):
if (env["bits"]=="64"):
env.Append(CCFLAGS=['-arch', 'x86_64'])
env.Append(LINKFLAGS=['-arch', 'x86_64'])
- else:
+ elif (env["bits"]=="32"):
env.Append(CCFLAGS=['-arch', 'i386'])
env.Append(LINKFLAGS=['-arch', 'i386'])
+ else:
+ env.Append(CCFLAGS=['-arch', 'i386', '-arch', 'x86_64'])
+ env.Append(LINKFLAGS=['-arch', 'i386', '-arch', 'x86_64'])
else:
#osxcross build
root=os.environ.get("OSXCROSS_ROOT",0)