summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2011-02-11 16:29:01 +0000
committerJosé Fonseca <[email protected]>2011-02-11 20:09:26 +0000
commit051f8bbfee6618e8bf04712cf214d96cec433e38 (patch)
tree28b0bb97482454decb5cefc748baa1516e7f47c5
parent3ee97ead0b827e6c6a40ec1a326f9d01d5e5b413 (diff)
scons: Fix MSVC 64bit build.
-rwxr-xr-x[-rw-r--r--]scons/gallium.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index 322b23b2b00..ea09b5d0d69 100644..100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -141,6 +141,10 @@ def pkg_config_modules(env, name, modules):
def generate(env):
"""Common environment generation code"""
+ # Tell tools which machine to compile for
+ env['TARGET_ARCH'] = env['machine']
+ env['MSVS_ARCH'] = env['machine']
+
# Toolchain
platform = env['platform']
if env['toolchain'] == 'default':
@@ -175,6 +179,10 @@ def generate(env):
env['gcc'] = 'gcc' in os.path.basename(env['CC']).split('-')
env['msvc'] = env['CC'] == 'cl'
+ if env['msvc'] and env['toolchain'] == 'default' and env['machine'] == 'x86_64':
+ # MSVC x64 support is broken in earlier versions of scons
+ env.EnsurePythonVersion(2, 0)
+
# shortcuts
machine = env['machine']
platform = env['platform']