diff options
author | José Fonseca <[email protected]> | 2011-02-11 16:44:13 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2011-02-11 20:09:26 +0000 |
commit | ae760279f142244590c8aa76e3139529ca42952f (patch) | |
tree | d293943af92cd7514536d9506d52858bf772225c /scons | |
parent | 051f8bbfee6618e8bf04712cf214d96cec433e38 (diff) |
scons: Try to support building 64bit binaries on 32bit windows.
Diffstat (limited to 'scons')
-rwxr-xr-x | scons/gallium.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scons/gallium.py b/scons/gallium.py index ea09b5d0d69..f9a2e592db8 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -35,6 +35,7 @@ import os import os.path import re import subprocess +import platform as _platform import SCons.Action import SCons.Builder @@ -191,6 +192,23 @@ def generate(env): gcc = env['gcc'] msvc = env['msvc'] + # Determine whether we are cross compiling; in particular, whether we need + # to compile code generators with a different compiler as the target code. + host_platform = _platform.system().lower() + host_machine = os.environ.get('PROCESSOR_ARCHITECTURE', _platform.machine()) + host_machine = { + 'x86': 'x86', + 'i386': 'x86', + 'i486': 'x86', + 'i586': 'x86', + 'i686': 'x86', + 'ppc' : 'ppc', + 'x86_64': 'x86_64', + }.get(host_machine, 'generic') + env['crosscompile'] = platform != host_platform + if machine == 'x86_64' and host_machine != 'x86_64': + env['crosscompile'] = True + # Backwards compatability with the debug= profile= options if env['build'] == 'debug': if not env['debug']: |