Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Side by Side Diff: tools/utils.py

Issue 1707013: Add amd64 to GuessArchitecture (Closed)
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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'
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698