diff options
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(): |