| OLD | NEW |
| 1 # Copyright 2008 the V8 project authors. All rights reserved. | 1 # Copyright 2008 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 elif id == 'Darwin': | 50 elif id == 'Darwin': |
| 51 return 'macos' | 51 return 'macos' |
| 52 elif id == 'Windows' or id == 'Microsoft': | 52 elif id == 'Windows' or id == 'Microsoft': |
| 53 # On Windows Vista platform.system() can return 'Microsoft' with some | 53 # On Windows Vista platform.system() can return 'Microsoft' with some |
| 54 # versions of Python, see http://bugs.python.org/issue1082 | 54 # versions of Python, see http://bugs.python.org/issue1082 |
| 55 return 'win32' | 55 return 'win32' |
| 56 elif id == 'FreeBSD': | 56 elif id == 'FreeBSD': |
| 57 return 'freebsd' | 57 return 'freebsd' |
| 58 elif id == 'OpenBSD': | 58 elif id == 'OpenBSD': |
| 59 return 'openbsd' | 59 return 'openbsd' |
| 60 elif id == 'SunOS': |
| 61 return 'solaris' |
| 60 else: | 62 else: |
| 61 return None | 63 return None |
| 62 | 64 |
| 63 | 65 |
| 64 def GuessArchitecture(): | 66 def GuessArchitecture(): |
| 65 id = platform.machine() | 67 id = platform.machine() |
| 66 if id.startswith('arm'): | 68 if id.startswith('arm'): |
| 67 return 'arm' | 69 return 'arm' |
| 68 elif (not id) or (not re.match('(x|i[3-6])86', id) is None): | 70 elif (not id) or (not re.match('(x|i[3-6])86', id) is None): |
| 69 return 'ia32' | 71 return 'ia32' |
| 72 elif id == 'i86pc': |
| 73 return 'ia32' |
| 70 else: | 74 else: |
| 71 return None | 75 return None |
| 72 | 76 |
| 73 | 77 |
| 74 def GuessWordsize(): | 78 def GuessWordsize(): |
| 75 if '64' in platform.machine(): | 79 if '64' in platform.machine(): |
| 76 return '64' | 80 return '64' |
| 77 else: | 81 else: |
| 78 return '32' | 82 return '32' |
| 79 | 83 |
| 80 | 84 |
| 81 def IsWindows(): | 85 def IsWindows(): |
| 82 return GuessOS() == 'win32' | 86 return GuessOS() == 'win32' |
| OLD | NEW |