ENH: bypass complicated VisualC logic, and use the .bat file to get correct arch...
authorcournape <cournape@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 19 Nov 2009 04:52:55 +0000 (04:52 +0000)
committercournape <cournape@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Thu, 19 Nov 2009 04:52:55 +0000 (04:52 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@4435 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Tool/MSCommon/vc.py

index d5e31104ca724e00ba184d50b57cb1acce05968f..9b4efc6ba11dd880764a7007aa58de79a385c070 100644 (file)
@@ -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()