return os.path.join(tcdir, tcname)
+def GetBionicToolchain():
+ tcdir = os.path.join(NACL_DIR, 'toolchain', '.tars')
+ tcname = 'naclsdk_%s_arm_bionic.tgz' % getos.GetPlatform()
+ return os.path.join(tcdir, tcname)
+
+
def GetPNaClToolchain():
tcdir = os.path.join(NACL_DIR, 'toolchain', '.tars')
tcname = 'naclsdk_pnacl_%s_x86.tgz' % getos.GetPlatform()
return os.path.join(tcpath, 'lib-' + arch)
-def BuildStepDownloadToolchains():
+def BuildStepDownloadToolchains(toolchains):
buildbot_common.BuildStep('Running download_toolchains.py')
download_script = os.path.join('build', 'download_toolchains.py')
- buildbot_common.Run([sys.executable, download_script,
- '--no-arm-trusted', '--arm-untrusted', '--keep'],
- cwd=NACL_DIR)
+ args = [sys.executable, download_script, '--no-arm-trusted',
+ '--arm-untrusted', '--keep']
+ if 'bionic' in toolchains:
+ args.append('--allow-bionic')
+ buildbot_common.Run(args, cwd=NACL_DIR)
def BuildStepCleanPepperDirs(pepperdir, pepperdir_old):
newlibdir = os.path.join(pepperdir, 'toolchain', tcname)
buildbot_common.Move(srcdir, newlibdir)
+ if 'bionic' in toolchains:
+ # Untar the bionic toolchains
+ tarfile = GetBionicToolchain()
+ tcname = platform + '_arm_bionic'
+ buildbot_common.Run([sys.executable, CYGTAR, '-C', tmpdir, '-xf', tarfile],
+ cwd=NACL_DIR)
+ srcdir = os.path.join(tmpdir, tcname)
+ bionicdir = os.path.join(pepperdir, 'toolchain', tcname)
+ buildbot_common.Move(srcdir, bionicdir)
+
if 'arm' in toolchains:
# Copy the existing arm toolchain from native_client tree
tcname = platform + '_arm_newlib'
# List of toolchain headers to install.
-# Source is relative to native_client tree, destination is relative
+# Source is relative to top of Chromium tree, destination is relative
# to the toolchain header directory.
NACL_HEADER_MAP = {
'newlib': [
- ('src/include/nacl/nacl_exception.h', 'nacl/'),
- ('src/include/nacl/nacl_minidump.h', 'nacl/'),
- ('src/untrusted/irt/irt.h', ''),
- ('src/untrusted/irt/irt_dev.h', ''),
- ('src/untrusted/irt/irt_ppapi.h', ''),
- ('src/untrusted/nacl/nacl_dyncode.h', 'nacl/'),
- ('src/untrusted/nacl/nacl_startup.h', 'nacl/'),
- ('src/untrusted/nacl/nacl_thread.h', 'nacl/'),
- ('src/untrusted/pthread/pthread.h', ''),
- ('src/untrusted/pthread/semaphore.h', ''),
- ('src/untrusted/valgrind/dynamic_annotations.h', 'nacl/'),
+ ('native_client/src/include/nacl/nacl_exception.h', 'nacl/'),
+ ('native_client/src/include/nacl/nacl_minidump.h', 'nacl/'),
+ ('native_client/src/untrusted/irt/irt.h', ''),
+ ('native_client/src/untrusted/irt/irt_dev.h', ''),
+ ('native_client/src/untrusted/nacl/nacl_dyncode.h', 'nacl/'),
+ ('native_client/src/untrusted/nacl/nacl_startup.h', 'nacl/'),
+ ('native_client/src/untrusted/nacl/nacl_thread.h', 'nacl/'),
+ ('native_client/src/untrusted/pthread/pthread.h', ''),
+ ('native_client/src/untrusted/pthread/semaphore.h', ''),
+ ('native_client/src/untrusted/valgrind/dynamic_annotations.h', 'nacl/'),
+ ('ppapi/nacl_irt/irt_ppapi.h', ''),
],
'glibc': [
- ('src/include/nacl/nacl_exception.h', 'nacl/'),
- ('src/include/nacl/nacl_minidump.h', 'nacl/'),
- ('src/untrusted/irt/irt.h', ''),
- ('src/untrusted/irt/irt_dev.h', ''),
- ('src/untrusted/irt/irt_ppapi.h', ''),
- ('src/untrusted/nacl/nacl_dyncode.h', 'nacl/'),
- ('src/untrusted/nacl/nacl_startup.h', 'nacl/'),
- ('src/untrusted/nacl/nacl_thread.h', 'nacl/'),
- ('src/untrusted/valgrind/dynamic_annotations.h', 'nacl/'),
+ ('native_client/src/include/nacl/nacl_exception.h', 'nacl/'),
+ ('native_client/src/include/nacl/nacl_minidump.h', 'nacl/'),
+ ('native_client/src/untrusted/irt/irt.h', ''),
+ ('native_client/src/untrusted/irt/irt_dev.h', ''),
+ ('native_client/src/untrusted/nacl/nacl_dyncode.h', 'nacl/'),
+ ('native_client/src/untrusted/nacl/nacl_startup.h', 'nacl/'),
+ ('native_client/src/untrusted/nacl/nacl_thread.h', 'nacl/'),
+ ('native_client/src/untrusted/valgrind/dynamic_annotations.h', 'nacl/'),
+ ('ppapi/nacl_irt/irt_ppapi.h', ''),
],
'host': []
}
# ones
tc_name = 'newlib'
- InstallFiles(NACL_DIR, tc_dst_inc, NACL_HEADER_MAP[tc_name])
+ InstallFiles(SRC_DIR, tc_dst_inc, NACL_HEADER_MAP[tc_name])
def MakeNinjaRelPath(path):
def main(args):
parser = optparse.OptionParser()
+ parser.add_option('--bionic', help='Add bionic build.',
+ action='store_true')
parser.add_option('--tar', help='Force the tar step.',
action='store_true')
parser.add_option('--archive', help='Force the archive step.',
options.tar = True
toolchains = ['newlib', 'glibc', 'arm', 'pnacl', 'host']
+ if options.bionic:
+ toolchains.append('bionic')
+
print 'Building: ' + ' '.join(toolchains)
if options.archive and not options.tar:
if not options.skip_toolchain:
BuildStepCleanPepperDirs(pepperdir, pepperdir_old)
BuildStepMakePepperDirs(pepperdir, ['include', 'toolchain', 'tools'])
- BuildStepDownloadToolchains()
+ BuildStepDownloadToolchains(toolchains)
BuildStepUntarToolchains(pepperdir, toolchains)
BuildStepBuildToolchains(pepperdir, toolchains)