diff options
author | William Deegan <bill@baddogconsulting.com> | 2010-02-09 20:17:32 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2010-02-09 20:17:32 (GMT) |
commit | e38fd2b8df307a325e4d7840f46a5401cac673d0 (patch) | |
tree | a47bf379fb93ebd7c5ec3a09c51db593cbf52042 /src/engine/SCons/Tool/MSCommon | |
parent | 9575744cc0b76d075936f1dec6f48990afac7c36 (diff) | |
download | SCons-e38fd2b8df307a325e4d7840f46a5401cac673d0.zip SCons-e38fd2b8df307a325e4d7840f46a5401cac673d0.tar.gz SCons-e38fd2b8df307a325e4d7840f46a5401cac673d0.tar.bz2 |
MS win32 sdk issue, fixed requested arch to not request cross compile when building 32 bit on 64 bit host.
Diffstat (limited to 'src/engine/SCons/Tool/MSCommon')
-rw-r--r-- | src/engine/SCons/Tool/MSCommon/sdk.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/engine/SCons/Tool/MSCommon/sdk.py b/src/engine/SCons/Tool/MSCommon/sdk.py index c3290a8..030fc74 100644 --- a/src/engine/SCons/Tool/MSCommon/sdk.py +++ b/src/engine/SCons/Tool/MSCommon/sdk.py @@ -106,16 +106,20 @@ class SDKDefinition: def get_sdk_vc_script(self,host_arch, target_arch): """ Return the script to initialize the VC compiler installed by SDK """ + + if (host_arch == 'amd64' and target_arch == 'x86'): + # No cross tools needed compiling 32 bits on 64 bit machine + host_arch=target_arch arch_string=target_arch if (host_arch != target_arch): arch_string='%s_%s'%(host_arch,target_arch) - #print "arch_string:%s host_arch:%s target_arch:%s"%(arch_string, - # host_arch, - # target_arch) + debug("sdk.py: get_sdk_vc_script():arch_string:%s host_arch:%s target_arch:%s"%(arch_string, + host_arch, + target_arch)) file=self.vc_setup_scripts.get(arch_string,None) - #print "FILE:%s"%file + debug("sdk.py: get_sdk_vc_script():file:%s"%file) return file class WindowsSDK(SDKDefinition): @@ -231,9 +235,9 @@ def get_installed_sdks(): InstalledSDKList = [] InstalledSDKMap = {} for sdk in SupportedSDKList: - debug('trying to find SDK %s' % sdk.version) + debug('MSCommon/sdk.py: trying to find SDK %s' % sdk.version) if sdk.get_sdk_dir(): - debug('found SDK %s' % sdk.version) + debug('MSCommon/sdk.py:found SDK %s' % sdk.version) InstalledSDKList.append(sdk) InstalledSDKMap[sdk.version] = sdk return InstalledSDKList @@ -316,6 +320,7 @@ def mssdk_setup_env(env): if sdk_dir is None: return sdk_dir = env.subst(sdk_dir) + debug('mssdk_setup_env: Using MSSDK_DIR:%s'%sdk_dir) elif env.has_key('MSSDK_VERSION'): sdk_version = env['MSSDK_VERSION'] if sdk_version is None: @@ -324,6 +329,7 @@ def mssdk_setup_env(env): sdk_version = env.subst(sdk_version) mssdk = get_sdk_by_version(sdk_version) sdk_dir = mssdk.get_sdk_dir() + debug('mssdk_setup_env: Using MSSDK_VERSION:%s'%sdk_dir) elif env.has_key('MSVS_VERSION'): msvs_version = env['MSVS_VERSION'] debug('Getting MSVS_VERSION from env:%s'%msvs_version) @@ -344,11 +350,13 @@ def mssdk_setup_env(env): if not mssdk: return sdk_dir = mssdk.get_sdk_dir() + debug('mssdk_setup_env: Using MSVS_VERSION:%s'%sdk_dir) else: mssdk = get_default_sdk() if not mssdk: return sdk_dir = mssdk.get_sdk_dir() + debug('mssdk_setup_env: not using any env values. sdk_dir:%s'%sdk_dir) set_sdk_by_directory(env, sdk_dir) |