| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 | 65 |
| 66 def GuessArchitecture(): | 66 def GuessArchitecture(): |
| 67 id = platform.machine() | 67 id = platform.machine() |
| 68 if id.startswith('arm'): | 68 if id.startswith('arm'): |
| 69 return 'arm' | 69 return 'arm' |
| 70 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): |
| 71 return 'ia32' | 71 return 'ia32' |
| 72 elif id == 'i86pc': | 72 elif id == 'i86pc': |
| 73 return 'ia32' | 73 return 'ia32' |
| 74 elif id == 'amd64': |
| 75 return 'ia32' |
| 74 else: | 76 else: |
| 75 return None | 77 return None |
| 76 | 78 |
| 77 | 79 |
| 78 def GuessWordsize(): | 80 def GuessWordsize(): |
| 79 if '64' in platform.machine(): | 81 if '64' in platform.machine(): |
| 80 return '64' | 82 return '64' |
| 81 else: | 83 else: |
| 82 return '32' | 84 return '32' |
| 83 | 85 |
| 84 | 86 |
| 85 def IsWindows(): | 87 def IsWindows(): |
| 86 return GuessOS() == 'win32' | 88 return GuessOS() == 'win32' |
| OLD | NEW |