diff options
| author | William Deegan <bill@baddogconsulting.com> | 2010-02-04 07:31:43 (GMT) |
|---|---|---|
| committer | William Deegan <bill@baddogconsulting.com> | 2010-02-04 07:31:43 (GMT) |
| commit | 0a300e5809c19bed53b1936ef1db2201fd0a2b71 (patch) | |
| tree | d3808de1add26d08cf28bc353d465568e34b887c /src/engine/SCons/Tool/MSCommon/sdk.py | |
| parent | 689bb4560b5277797bc8aa02127362888e1a58cb (diff) | |
| download | SCons-0a300e5809c19bed53b1936ef1db2201fd0a2b71.zip SCons-0a300e5809c19bed53b1936ef1db2201fd0a2b71.tar.gz SCons-0a300e5809c19bed53b1936ef1db2201fd0a2b71.tar.bz2 | |
It should now handle picking up the SDK compilers when the VC vcvarsall.bat doesn't pick them.
Perhaps not for all flavors of the SDK, but for SDK 7.0.
Currently the following tests fail:
Failed the following 2 tests:
test\IDL\midl.py
test\Win32\scons-bat-error.py
We should add to the docs which combinations of VC and SDK we expect to work, and which have been tested.
Diffstat (limited to 'src/engine/SCons/Tool/MSCommon/sdk.py')
| -rw-r--r-- | src/engine/SCons/Tool/MSCommon/sdk.py | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/src/engine/SCons/Tool/MSCommon/sdk.py b/src/engine/SCons/Tool/MSCommon/sdk.py index 5491a87..c3290a8 100644 --- a/src/engine/SCons/Tool/MSCommon/sdk.py +++ b/src/engine/SCons/Tool/MSCommon/sdk.py @@ -102,6 +102,21 @@ class SDKDefinition: sdk_dir = self.find_sdk_dir() self._sdk_dir = sdk_dir return sdk_dir + + def get_sdk_vc_script(self,host_arch, target_arch): + """ Return the script to initialize the VC compiler installed by SDK + """ + + 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) + file=self.vc_setup_scripts.get(arch_string,None) + #print "FILE:%s"%file + return file class WindowsSDK(SDKDefinition): """ @@ -121,6 +136,21 @@ class PlatformSDK(SDKDefinition): apply(SDKDefinition.__init__, (self,)+args, kw) self.hkey_data = self.uuid +# +# The list of VC initialization scripts installed by the SDK +# These should be tried if the vcvarsall.bat TARGET_ARCH fails +preSDK61VCSetupScripts = { 'x86' : r'bin\vcvars32.bat', + 'amd64' : r'bin\vcvarsamd64.bat', + 'x86_amd64': r'bin\vcvarsx86_amd64.bat', + 'x86_ia64' : r'bin\vcvarsx86_ia64.bat', + 'ia64' : r'bin\vcvarsia64.bat'} + +SDk61AndLaterVCSetupScripts = {'x86' : r'bin\vcvars32.bat', + 'amd64' : r'bin\amd64\vcvarsamd64.bat', + 'x86_amd64': r'bin\x86_amd64\vcvarsx86_amd64.bat', + 'x86_ia64' : r'bin\x86_ia64\vcvarsx86_ia64.bat', + 'ia64' : r'bin\ia64\vcvarsia64.bat'} + # The list of support SDKs which we know how to detect. # # The first SDK found in the list is the one used by default if there @@ -129,6 +159,16 @@ class PlatformSDK(SDKDefinition): # # If you update this list, update the documentation in Tool/mssdk.xml. SupportedSDKList = [ + WindowsSDK('7.0', + sanity_check_file=r'bin\SetEnv.Cmd', + include_subdir='include', + lib_subdir={ + 'x86' : ['lib'], + 'x86_64' : [r'lib\x64'], + 'ia64' : [r'lib\ia64'], + }, + vc_setup_scripts = SDk61AndLaterVCSetupScripts, + ), WindowsSDK('6.1', sanity_check_file=r'bin\SetEnv.Cmd', include_subdir='include', @@ -137,6 +177,7 @@ SupportedSDKList = [ 'x86_64' : [r'lib\x64'], 'ia64' : [r'lib\ia64'], }, + vc_setup_scripts = SDk61AndLaterVCSetupScripts, ), WindowsSDK('6.0A', @@ -147,22 +188,26 @@ SupportedSDKList = [ 'x86_64' : [r'lib\x64'], 'ia64' : [r'lib\ia64'], }, + vc_setup_scripts = preSDK61VCSetupScripts, ), WindowsSDK('6.0', sanity_check_file=r'bin\gacutil.exe', include_subdir='include', lib_subdir='lib', + vc_setup_scripts = preSDK61VCSetupScripts, ), PlatformSDK('2003R2', sanity_check_file=r'SetEnv.Cmd', - uuid="D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1" + uuid="D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1", + vc_setup_scripts = preSDK61VCSetupScripts, ), PlatformSDK('2003R1', sanity_check_file=r'SetEnv.Cmd', uuid="8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3", + vc_setup_scripts = preSDK61VCSetupScripts, ), ] @@ -203,6 +248,7 @@ SDKEnvironmentUpdates = {} def set_sdk_by_directory(env, sdk_dir): global SDKEnvironmentUpdates + debug('set_sdk_by_directory: Using dir:%s'%sdk_dir) try: env_tuple_list = SDKEnvironmentUpdates[sdk_dir] except KeyError: @@ -264,7 +310,7 @@ def get_default_sdk(): return InstalledSDKList[0] def mssdk_setup_env(env): - debug('msvs_setup_env()') + debug('mssdk_setup_env()') if env.has_key('MSSDK_DIR'): sdk_dir = env['MSSDK_DIR'] if sdk_dir is None: |
