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

Unified Diff: build/download_utils.py

Issue 6825060: Rename PNaCl (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
Index: build/download_utils.py
===================================================================
--- build/download_utils.py (revision 4818)
+++ build/download_utils.py (working copy)
@@ -30,12 +30,27 @@
'mac': 'mac',
}
+ARCH_COLLAPSE = {
+ 'i386' : 'x86-32',
+ 'i686' : 'x86-32',
+ 'x86_64': 'x86-64',
+}
+
def PlatformName(name=None):
if name is None:
name = sys.platform
return PLATFORM_COLLAPSE[name]
+def ArchName(name=None):
+ if name is None:
+ if PlatformName() == 'windows':
+ # TODO(pdox): Figure out how to auto-detect 32-bit vs 64-bit Windows.
+ name = 'i386'
+ else:
+ import platform
+ name = platform.machine()
+ return ARCH_COLLAPSE[name]
def EnsureFileCanBeWritten(filename):
directory = os.path.dirname(filename)
@@ -125,4 +140,4 @@
def RemoveFile(path):
if os.path.exists(path):
- Retry(os.unlink, path)
+ Retry(os.unlink, path)

Powered by Google App Engine
This is Rietveld 408576698