diff options
author | Steven Knight <knight@baldmt.com> | 2010-06-07 18:41:10 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2010-06-07 18:41:10 (GMT) |
commit | 7e4dcd7b2852453a33c2f54339193c31958fe869 (patch) | |
tree | c9614b4e248ad0a0a6f491a29936ae2208ca22c7 | |
parent | 838124d3a69312c963e5be50451bed4899ab2a66 (diff) | |
download | SCons-7e4dcd7b2852453a33c2f54339193c31958fe869.zip SCons-7e4dcd7b2852453a33c2f54339193c31958fe869.tar.gz SCons-7e4dcd7b2852453a33c2f54339193c31958fe869.tar.bz2 |
Architecture canonicalization fixes:
* Lower-case the *_platform values to handle Pythons that return
upper-case values like 'AMD64'.
* Add "i[456]86" entries to the canonicalization dictionary.
* Sort and reformat the dictionary for readability.
-rw-r--r-- | src/engine/SCons/Tool/MSCommon/vc.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index 3c15dc1..f67c01b 100644 --- a/src/engine/SCons/Tool/MSCommon/vc.py +++ b/src/engine/SCons/Tool/MSCommon/vc.py @@ -71,13 +71,16 @@ class BatchFileExecutionError(VisualCException): # Dict to 'canonalize' the arch _ARCH_TO_CANONICAL = { - "x86": "x86", - "amd64": "amd64", - "i386": "x86", - "emt64": "amd64", - "x86_64": "amd64", - "itanium": "ia64", - "ia64": "ia64", + "amd64" : "amd64", + "emt64" : "amd64", + "i386" : "x86", + "i486" : "x86", + "i586" : "x86", + "i686" : "x86", + "ia64" : "ia64", + "itanium" : "ia64", + "x86" : "x86", + "x86_64" : "amd64", } # Given a (host, target) tuple, return the argument for the bat file. Both host @@ -113,13 +116,13 @@ def get_host_target(env): target_platform = host_platform try: - host = _ARCH_TO_CANONICAL[host_platform] + host = _ARCH_TO_CANONICAL[host_platform.lower()] except KeyError, e: msg = "Unrecognized host architecture %s" raise ValueError(msg % repr(host_platform)) try: - target = _ARCH_TO_CANONICAL[target_platform] + target = _ARCH_TO_CANONICAL[target_platform.lower()] except KeyError, e: raise ValueError("Unrecognized target architecture %s" % target_platform) |