Address some issues with detecting the architecture. See
authorerik.corry@gmail.com <erik.corry@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 31 Aug 2010 08:05:33 +0000 (08:05 +0000)
committererik.corry@gmail.com <erik.corry@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 31 Aug 2010 08:05:33 +0000 (08:05 +0000)
http://code.google.com/p/v8/issues/detail?id=429
Review URL: http://codereview.chromium.org/3261003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5378 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

tools/utils.py

index 3a55722..8083091 100644 (file)
@@ -63,14 +63,20 @@ def GuessOS():
     return None
 
 
+# This will default to building the 32 bit VM even on machines that are capable
+# of running the 64 bit VM.  Use the scons option --arch=x64 to force it to build
+# the 64 bit VM.
 def GuessArchitecture():
   id = platform.machine()
+  id = id.lower()  # Windows 7 capitalizes 'AMD64'.
   if id.startswith('arm'):
     return 'arm'
-  elif (not id) or (not re.match('(x|i[3-6])86', id) is None):
+  elif (not id) or (not re.match('(x|i[3-6])86$', id) is None):
     return 'ia32'
   elif id == 'i86pc':
     return 'ia32'
+  elif id == 'x86_64':
+    return 'ia32'
   elif id == 'amd64':
     return 'ia32'
   else: