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

Unified Diff: third_party/binutils/download.py

Issue 255023003: Linux: Switch 32-bit official builds to use the bundled 64-bit linker. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase, no tabs Created 6 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
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/binutils/download.py
===================================================================
--- third_party/binutils/download.py (revision 266613)
+++ third_party/binutils/download.py (working copy)
@@ -47,17 +47,14 @@
return subprocess.check_output(['python', DETECT_HOST_ARCH]).strip()
-def main(args):
- if not sys.platform.startswith('linux'):
- return 0
-
- archdir = os.path.join(BINUTILS_DIR, 'Linux_' + GetArch())
+def FetchAndExtract(arch):
+ archdir = os.path.join(BINUTILS_DIR, 'Linux_' + arch)
tarball = os.path.join(archdir, BINUTILS_FILE)
outdir = os.path.join(archdir, BINUTILS_OUT)
sha1file = tarball + '.sha1'
if not os.path.exists(sha1file):
- print "WARNING: No binutils found for your architecture (%s)!" % GetArch()
+ print "WARNING: No binutils found for your architecture (%s)!" % arch
return 0
checksum = ReadFile(sha1file)
@@ -96,5 +93,22 @@
return 0
+def main(args):
+ if not sys.platform.startswith('linux'):
+ return 0
+
+ arch = GetArch()
+ if arch == 'x64':
+ return FetchAndExtract(arch)
+ if arch == 'ia32':
+ ret = FetchAndExtract(arch)
+ if ret != 0:
+ return ret
+ # Fetch the x64 toolchain as well for official bots with 64-bit kernels.
+ return FetchAndExtract('x64')
+ print "Host architecture %s is not supported." % arch
+ return 1
+
+
if __name__ == '__main__':
sys.exit(main(sys.argv))
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698