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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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': | 60 elif id == 'SunOS': |
61 return 'solaris' | 61 return 'solaris' |
62 else: | 62 else: |
63 return None | 63 return None |
64 | 64 |
65 | 65 |
| 66 # This will default to building the 32 bit VM even on machines that are capable |
| 67 # of running the 64 bit VM. Use the scons option --arch=x64 to force it to buil
d |
| 68 # the 64 bit VM. |
66 def GuessArchitecture(): | 69 def GuessArchitecture(): |
67 id = platform.machine() | 70 id = platform.machine() |
| 71 id = id.lower() # Windows 7 capitalizes 'AMD64'. |
68 if id.startswith('arm'): | 72 if id.startswith('arm'): |
69 return 'arm' | 73 return 'arm' |
70 elif (not id) or (not re.match('(x|i[3-6])86', id) is None): | 74 elif (not id) or (not re.match('(x|i[3-6])86$', id) is None): |
71 return 'ia32' | 75 return 'ia32' |
72 elif id == 'i86pc': | 76 elif id == 'i86pc': |
73 return 'ia32' | 77 return 'ia32' |
| 78 elif id == 'x86_64': |
| 79 return 'ia32' |
74 elif id == 'amd64': | 80 elif id == 'amd64': |
75 return 'ia32' | 81 return 'ia32' |
76 else: | 82 else: |
77 return None | 83 return None |
78 | 84 |
79 | 85 |
80 def GuessWordsize(): | 86 def GuessWordsize(): |
81 if '64' in platform.machine(): | 87 if '64' in platform.machine(): |
82 return '64' | 88 return '64' |
83 else: | 89 else: |
84 return '32' | 90 return '32' |
85 | 91 |
86 | 92 |
87 def IsWindows(): | 93 def IsWindows(): |
88 return GuessOS() == 'win32' | 94 return GuessOS() == 'win32' |
OLD | NEW |