Chromium Code Reviews| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 return 'openbsd' | 61 return 'openbsd' |
| 62 elif id == 'SunOS': | 62 elif id == 'SunOS': |
| 63 return 'solaris' | 63 return 'solaris' |
| 64 elif id == 'NetBSD': | 64 elif id == 'NetBSD': |
| 65 return 'netbsd' | 65 return 'netbsd' |
| 66 else: | 66 else: |
| 67 return None | 67 return None |
| 68 | 68 |
| 69 | 69 |
| 70 # This will default to building the 32 bit VM even on machines that are capable | 70 # This will default to building the 32 bit VM even on machines that are capable |
| 71 # of running the 64 bit VM. Use the scons option --arch=x64 to force it to buil d | 71 # of running the 64 bit VM. Use the v8_target_arch=x64 GYP define to force it |
|
Jakob Kummerow
2013/04/22 17:30:15
This entire file (utils.py) isn't used anymore. Lo
Michael Starzinger
2013/04/23 08:41:16
Done.
| |
| 72 # the 64 bit VM. | 72 # to build the 64 bit VM. |
| 73 def GuessArchitecture(): | 73 def GuessArchitecture(): |
| 74 id = platform.machine() | 74 id = platform.machine() |
| 75 id = id.lower() # Windows 7 capitalizes 'AMD64'. | 75 id = id.lower() # Windows 7 capitalizes 'AMD64'. |
| 76 if id.startswith('arm'): | 76 if id.startswith('arm'): |
| 77 return 'arm' | 77 return 'arm' |
| 78 elif (not id) or (not re.match('(x|i[3-6])86$', id) is None): | 78 elif (not id) or (not re.match('(x|i[3-6])86$', id) is None): |
| 79 return 'ia32' | 79 return 'ia32' |
| 80 elif id == 'i86pc': | 80 elif id == 'i86pc': |
| 81 return 'ia32' | 81 return 'ia32' |
| 82 elif id == 'x86_64': | 82 elif id == 'x86_64': |
| 83 return 'ia32' | 83 return 'ia32' |
| 84 elif id == 'amd64': | 84 elif id == 'amd64': |
| 85 return 'ia32' | 85 return 'ia32' |
| 86 else: | 86 else: |
| 87 return None | 87 return None |
| 88 | 88 |
| 89 | 89 |
| 90 def GuessWordsize(): | 90 def GuessWordsize(): |
| 91 if '64' in platform.machine(): | 91 if '64' in platform.machine(): |
| 92 return '64' | 92 return '64' |
| 93 else: | 93 else: |
| 94 return '32' | 94 return '32' |
| 95 | 95 |
| 96 | 96 |
| 97 def IsWindows(): | 97 def IsWindows(): |
| 98 return GuessOS() == 'win32' | 98 return GuessOS() == 'win32' |
| OLD | NEW |