diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-29 01:22:10 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-29 01:22:10 +0000 |
commit | ac296392d7ab509cda68f9465e0f3f23bc383879 (patch) | |
tree | 55ce5bcb9d27ef248508f1e300a54ada53751bd5 /third_party/binutils | |
parent | b71e2501b2ab530bcb61c6e812fc1f5a4132a019 (diff) | |
download | chromium_src-ac296392d7ab509cda68f9465e0f3f23bc383879.zip chromium_src-ac296392d7ab509cda68f9465e0f3f23bc383879.tar.gz chromium_src-ac296392d7ab509cda68f9465e0f3f23bc383879.tar.bz2 |
Linux: Switch 32-bit official builds to use the bundled 64-bit linker.
It is assumed that even though the buildbots have 32-bit userland,
they also have a 64-bit kernel and a 64-bit libc installed.
BUG=366523
Review URL: https://codereview.chromium.org/255023003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266729 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/binutils')
-rwxr-xr-x | third_party/binutils/download.py | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/third_party/binutils/download.py b/third_party/binutils/download.py index 2891c82..b4f0f9b 100755 --- a/third_party/binutils/download.py +++ b/third_party/binutils/download.py @@ -47,17 +47,14 @@ def GetArch(): 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 @@ def main(args): 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)) |