From 2a9ebca56238a40ceb3925c7d15642fd9d6765dc Mon Sep 17 00:00:00 2001 From: cournape Date: Thu, 19 Nov 2009 04:52:55 +0000 Subject: [PATCH] ENH: bypass complicated VisualC logic, and use the .bat file to get correct arch settings instead. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4435 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/engine/SCons/Tool/MSCommon/vc.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index d5e31104..9b4efc6b 100644 --- a/src/engine/SCons/Tool/MSCommon/vc.py +++ b/src/engine/SCons/Tool/MSCommon/vc.py @@ -298,6 +298,11 @@ def get_default_version(env): return msvc_version +_TARGET_ARCH_TO_BAT_ARCH = { + "x86_64": "amd64", + "i386": "x86", + "amd64": "amd64"} + def msvc_setup_env(env): debug('msvc_setup_env()') @@ -325,9 +330,11 @@ def msvc_setup_env(env): debug('use_script 1 %s\n' % repr(use_script)) d = script_env(use_script) elif use_script: - script = msvc.get_batch_file(target_platform, host_platform) - debug('use_script 2 %s target_platform:%s host_platform:%s\n' % (repr(script),target_platform,host_platform)) - d = script_env(script) + # XXX: this is VS 2008 specific, fix this + script = os.path.join(msvc.find_vc_dir(), "vcvarsall.bat") + + debug('use_script 2 %s, args:%s\n' % (repr(script), target_platform)) + d = script_env(script, args=target_platform) else: debug('msvc.get_default_env()\n') d = msvc.get_default_env() -- 2.26.2