From: cournape Date: Thu, 19 Nov 2009 04:52:55 +0000 (+0000) Subject: ENH: bypass complicated VisualC logic, and use the .bat file to get correct arch... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2a9ebca56238a40ceb3925c7d15642fd9d6765dc;p=scons.git 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 --- 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()