REF: query host/target arch only when using bat file.
authorcournape <cournape@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Mon, 23 Nov 2009 07:43:58 +0000 (07:43 +0000)
committercournape <cournape@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Mon, 23 Nov 2009 07:43:58 +0000 (07:43 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@4470 fdb21ef1-2011-0410-befe-b5e4ea1792b1

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

index 108b781ed32d8d83dc405f517d316bde0e1d6b6d..79567971a505ba1c54c0a31af18a3436eeb1e884 100644 (file)
@@ -260,8 +260,6 @@ def msvc_setup_env(env):
                    "compilers most likely not set correctly"
         SCons.Warnings.warn(SCons.Warnings.VisualCMissingWarning, warn_msg)
         return None
-
-    host_platform, target_platform = get_host_target(env)
     debug('msvc_setup_env: using specified MSVC version %s\n' % repr(version))
 
     # XXX: we set-up both MSVS version for backward
@@ -286,6 +284,7 @@ def msvc_setup_env(env):
         debug('use_script 1 %s\n' % repr(use_script))
         d = script_env(use_script)
     elif use_script:
+        host_platform, target_platform = get_host_target(env)
         host_target = (host_platform, target_platform)
         arg = _HOST_TARGET_ARCH_TO_BAT_ARCH[host_target]
         debug('use_script 2 %s, args:%s\n' % (repr(script), arg))