diff options
author | jvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-28 23:09:11 +0000 |
---|---|---|
committer | jvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-28 23:09:11 +0000 |
commit | 824b02d9af091a619eeabb8562e7025cfac22545 (patch) | |
tree | fd21bccb555115212ee9153ffeb80fa0fbbd0a62 /native_client_sdk | |
parent | fa584a83bcfc8b30e6e0cf3c108f3e4c53fc2d9d (diff) | |
download | chromium_src-824b02d9af091a619eeabb8562e7025cfac22545.zip chromium_src-824b02d9af091a619eeabb8562e7025cfac22545.tar.gz chromium_src-824b02d9af091a619eeabb8562e7025cfac22545.tar.bz2 |
Allow 64-bit linux pnacl sdk builder to use 64-bit toolchain
binaries instead of 32-bit toolchain binaries.
BUG= linux pnacl sdk bot redness.
TEST= naclsdk trybots.
Review URL: https://chromiumcodereview.appspot.com/9837123
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129513 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rwxr-xr-x | native_client_sdk/src/build_tools/build_sdk.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/native_client_sdk/src/build_tools/build_sdk.py b/native_client_sdk/src/build_tools/build_sdk.py index 02d3089..0276c56 100755 --- a/native_client_sdk/src/build_tools/build_sdk.py +++ b/native_client_sdk/src/build_tools/build_sdk.py @@ -19,6 +19,7 @@ and whether it should upload an SDK to file storage (GSTORE) # std python includes import optparse import os +import platform import sys import zipfile @@ -90,12 +91,14 @@ def GetNewlibToolchain(platform, arch): return os.path.join(tcdir, tcname) -def GetPNaClToolchain(platform, arch): +def GetPNaClToolchain(os_platform, arch): tcdir = os.path.join(NACL_DIR, 'toolchain', '.tars') - if arch == 'x86': - tcname = 'naclsdk_pnacl_%s_%s_32.tgz' % (platform, arch) - else: - buildbot_common.ErrorExit('Unknown architecture.') + # Refine the toolchain host arch. For linux, we happen to have + # toolchains for 64-bit hosts. For other OSes, we only have 32-bit binaries. + arch = 'x86_32' + if os_platform == 'linux' and platform.machine() == 'x86_64': + arch = 'x86_64' + tcname = 'naclsdk_pnacl_%s_%s.tgz' % (os_platform, arch) return os.path.join(tcdir, tcname) def GetScons(): |