Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[NaCl SDK] Remove support for bionic toolchain
Browse files Browse the repository at this point in the history
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_nacl_sdk;tryserver.chromium.mac:mac_nacl_sdk;tryserver.chromium.win:win_nacl_sdk

Review URL: https://codereview.chromium.org/1269623004

Cr-Commit-Position: refs/heads/master@{#362454}
  • Loading branch information
sbc100 authored and Commit bot committed Dec 1, 2015
1 parent 3589f9c commit 2bd1f02
Show file tree
Hide file tree
Showing 25 changed files with 28 additions and 847 deletions.
4 changes: 2 additions & 2 deletions native_client_sdk/src/BUILDING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ You can build a specific toolchain/configuration combination::

make TOOLCHAIN=newlib CONFIG=Debug -j8

The valid toolchains are: `newlib`, `glibc`, `clang-newlib`, `pnacl` and
`bionic`. The valid configurations are: `Debug` and `Release`.
The valid toolchains are: `newlib`, `glibc`, `clang-newlib` and `pnacl`.
The valid configurations are: `Debug` and `Release`.

To run the example::

Expand Down
9 changes: 0 additions & 9 deletions native_client_sdk/src/build_tools/build_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
'win': ['x86_32']
}
VALID_TOOLCHAINS = [
'bionic',
'newlib',
'clang-newlib',
'glibc',
Expand Down Expand Up @@ -213,10 +212,6 @@ def BuildProjectsBranch(pepperdir, branch, deps, clean, config, args=None):
make_cmd = [make, '-j', jobs]

make_cmd.append('CONFIG='+config)
# We always ENABLE_BIONIC in case we need it. If neither --bionic nor
# -t bionic have been provided on the command line, then VALID_TOOLCHAINS
# will not contain a bionic target.
make_cmd.append('ENABLE_BIONIC=1')
if not deps:
make_cmd.append('IGNORE_DEPS=1')

Expand Down Expand Up @@ -256,8 +251,6 @@ def main(args):
parser.add_argument('--config',
help='Choose configuration to build (Debug or Release). Builds both '
'by default')
parser.add_argument('--bionic',
help='Enable bionic projects', action='store_true')
parser.add_argument('-x', '--experimental',
help='Build experimental projects', action='store_true')
parser.add_argument('-t', '--toolchain',
Expand Down Expand Up @@ -301,8 +294,6 @@ def main(args):
# e.g. If an example supports newlib and glibc, then the default will be
# newlib.
options.toolchain = ['pnacl', 'newlib', 'glibc', 'host', 'clang-newlib']
if options.experimental or options.bionic:
options.toolchain.append('bionic')

if 'host' in options.toolchain:
options.toolchain.remove('host')
Expand Down
75 changes: 6 additions & 69 deletions native_client_sdk/src/build_tools/build_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
TOOLCHAIN_PACKAGE_MAP = {
'arm_glibc': ('nacl_arm_glibc', '%(platform)s_arm_glibc', 'arm'),
'x86_glibc': ('nacl_x86_glibc', '%(platform)s_x86_glibc', 'x86'),
'arm_bionic': ('nacl_arm_bionic', '%(platform)s_arm_bionic', 'arm'),
'pnacl': ('pnacl_newlib', '%(platform)s_pnacl', 'pnacl')
}

Expand All @@ -85,7 +84,7 @@ def GetToolchainDir(pepperdir, tcname):
def GetToolchainLibc(tcname):
if tcname == 'pnacl':
return 'newlib'
for libc in ('bionic', 'glibc', 'newlib', 'host'):
for libc in ('glibc', 'newlib', 'host'):
if libc in tcname:
return libc

Expand Down Expand Up @@ -125,10 +124,7 @@ def GetGypBuiltLib(tcname, arch):
else:
lib_suffix = ''

if tcname == 'arm_bionic':
tcdir = 'tc_newlib'
else:
tcdir = 'tc_' + GetToolchainLibc(tcname)
tcdir = 'tc_' + GetToolchainLibc(tcname)

if tcname == 'pnacl':
if arch is None:
Expand Down Expand Up @@ -167,9 +163,6 @@ def GetPNaClTranslatorLib(tcpath, arch):
def BuildStepDownloadToolchains(toolchains):
buildbot_common.BuildStep('Running package_version.py')
args = [sys.executable, PKGVER, '--mode', 'nacl_core_sdk']
if 'arm_bionic' in toolchains:
build_platform = '%s_x86' % getos.GetPlatform()
args.extend(['--append', os.path.join(build_platform, 'nacl_arm_bionic')])
args.extend(['sync', '--extract'])
buildbot_common.Run(args, cwd=NACL_DIR)

Expand Down Expand Up @@ -293,9 +286,6 @@ def BuildStepUntarToolchains(pepperdir, toolchains):
('native_client/src/untrusted/valgrind/dynamic_annotations.h', 'nacl/'),
('ppapi/nacl_irt/public/irt_ppapi.h', ''),
],
'bionic': [
('ppapi/nacl_irt/public/irt_ppapi.h', ''),
],
}

def InstallFiles(src_root, dest_root, file_list):
Expand Down Expand Up @@ -354,13 +344,6 @@ def MakeNinjaRelPath(path):
# already provided by the toolchain.
# Mapping from libc to libraries gyp-build trusted libraries
TOOLCHAIN_LIBS = {
'bionic' : [
'libminidump_generator.a',
'libnacl_dyncode.a',
'libnacl_exception.a',
'libnacl_list_mappings.a',
'libppapi.a',
],
'newlib' : [
'libminidump_generator.a',
'libnacl.a',
Expand Down Expand Up @@ -452,7 +435,7 @@ def GypNinjaInstall(pepperdir, toolchains):
xarches = (None, 'ia32', 'x64', 'arm')
elif tc in ('x86_glibc', 'x86_newlib'):
xarches = ('ia32', 'x64')
elif tc in ('arm_glibc', 'arm_bionic'):
elif tc == 'arm_glibc':
xarches = ('arm',)
else:
raise AssertionError('unexpected toolchain value: %s' % tc)
Expand Down Expand Up @@ -869,13 +852,8 @@ def BuildStepBuildAppEngine(pepperdir, chrome_revision):

def main(args):
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--nacl-tree-path',
help='Path to native client tree for bionic build.',
dest='nacl_tree_path')
parser.add_argument('--qemu', help='Add qemu for ARM.',
action='store_true')
parser.add_argument('--bionic', help='Add bionic build.',
action='store_true')
parser.add_argument('--tar', help='Force the tar step.',
action='store_true')
parser.add_argument('--archive', help='Force the archive step.',
Expand Down Expand Up @@ -912,29 +890,6 @@ def main(args):

buildbot_common.BuildStep('build_sdk')

if options.nacl_tree_path:
options.bionic = True
toolchain_build = os.path.join(options.nacl_tree_path, 'toolchain_build')
print 'WARNING: Building bionic toolchain from NaCl checkout.'
print 'This option builds bionic from the sources currently in the'
print 'provided NativeClient checkout, and the results instead of '
print 'downloading a toolchain from the builder. This may result in a'
print 'NaCl SDK that can not run on ToT chrome.'
print 'NOTE: To clobber you will need to run toolchain_build_bionic.py'
print 'directly from the NativeClient checkout.'
print ''
response = raw_input("Type 'y' and hit enter to continue.\n")
if response != 'y' and response != 'Y':
print 'Aborting.'
return 1

# Get head version of NativeClient tree
buildbot_common.BuildStep('Build bionic toolchain.')
buildbot_common.Run([sys.executable, 'toolchain_build_bionic.py', '-f'],
cwd=toolchain_build)
else:
toolchain_build = None

if buildbot_common.IsSDKBuilder():
options.archive = True
# TODO(binji): re-enable app_engine build when the linux builder stops
Expand All @@ -947,11 +902,6 @@ def main(args):
# Makefiles; the first toolchain will be the default.
toolchains = ['pnacl', 'x86_glibc', 'arm_glibc', 'clang-newlib', 'host']

# Changes for experimental bionic builder
if options.bionic:
toolchains.append('arm_bionic')
options.build_app_engine = False

print 'Building: ' + ' '.join(toolchains)
platform = getos.GetPlatform()

Expand All @@ -965,10 +915,7 @@ def main(args):
pepper_old = str(chrome_version - 1)
pepperdir = os.path.join(OUT_DIR, 'pepper_' + pepper_ver)
pepperdir_old = os.path.join(OUT_DIR, 'pepper_' + pepper_old)
if options.bionic:
tarname = 'naclsdk_bionic.tar.bz2'
else:
tarname = 'naclsdk_%s.tar.bz2' % platform
tarname = 'naclsdk_%s.tar.bz2' % platform
tarfile = os.path.join(OUT_DIR, tarname)

if options.release:
Expand All @@ -993,16 +940,7 @@ def main(args):
BuildStepCleanPepperDirs(pepperdir, pepperdir_old)
BuildStepMakePepperDirs(pepperdir, ['include', 'toolchain', 'tools'])
BuildStepDownloadToolchains(toolchains)
if options.nacl_tree_path:
# Instead of untarring, copy the raw bionic toolchain
not_bionic = [i for i in toolchains if i != 'arm_bionic']
BuildStepUntarToolchains(pepperdir, not_bionic)
tcname = GetToolchainDirName('arm_bionic')
srcdir = os.path.join(toolchain_build, 'out', tcname)
bionicdir = os.path.join(pepperdir, 'toolchain', tcname)
oshelpers.Copy(['-r', srcdir, bionicdir])
else:
BuildStepUntarToolchains(pepperdir, toolchains)
BuildStepUntarToolchains(pepperdir, toolchains)
if platform == 'linux':
buildbot_common.Move(os.path.join(pepperdir, 'toolchain', 'arm_trusted'),
os.path.join(OUT_DIR, 'arm_trusted'))
Expand Down Expand Up @@ -1044,8 +982,7 @@ def main(args):
GenerateNotice(pepperdir)

# Verify the SDK contains what we expect.
if not options.bionic:
BuildStepVerifyFilelist(pepperdir)
BuildStepVerifyFilelist(pepperdir)

if options.tar:
BuildStepTarBundle(pepper_ver, tarfile)
Expand Down
4 changes: 2 additions & 2 deletions native_client_sdk/src/build_tools/buildbot_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def IsSDKBuilder():
(win|mac|linux)_nacl_sdk_build
Builder names:
(windows|mac|linux)-sdk-multi(bionic)(rel)?"""
(windows|mac|linux)-sdk-multi(rel)?"""
bot = os.getenv('BUILDBOT_BUILDERNAME', '')
return '-sdk-multi' in bot or '-sdk-bionic-multi' in bot
return '-sdk-multi' in bot


def ErrorExit(msg):
Expand Down
7 changes: 0 additions & 7 deletions native_client_sdk/src/build_tools/buildbot_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ def StepBuildSDK():
new_script_dir = SCRIPT_DIR

args = [sys.executable, 'build_sdk.py']
if 'bionic' in os.getenv('BUILDBOT_BUILDERNAME', ''):
args.append('--bionic')

try:
Run(args, cwd=new_script_dir)
Expand All @@ -87,11 +85,6 @@ def StepTestSDK():
])

cmd.extend([sys.executable, 'test_sdk.py'])

# TODO(noelallen): crbug 386332
# For Bionic SDK, only build do a build test until we have hardware.
if 'bionic' in os.getenv('BUILDBOT_BUILDERNAME', ''):
cmd.extend(['build_examples', 'copy_tests', 'build_tests'])
Run(cmd, cwd=SCRIPT_DIR)


Expand Down
10 changes: 0 additions & 10 deletions native_client_sdk/src/build_tools/json/naclsdk_manifest2.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,6 @@
"revision": 0,
"stability": "canary",
"version": 0
},
{
"archives": [],
"description": "Bionic Canary",
"name": "bionic_canary",
"recommended": "no",
"repath": "",
"revision": 0,
"stability": "canary",
"version": 0
}
],
"manifest_version": 2
Expand Down
1 change: 0 additions & 1 deletion native_client_sdk/src/build_tools/parse_dsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import sys

VALID_TOOLCHAINS = [
'bionic',
'clang-newlib',
'newlib',
'glibc',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
sys.path.append(BUILD_TOOLS_DIR)
import manifest_util
import update_nacl_manifest
from update_nacl_manifest import CANARY_BUNDLE_NAME, BIONIC_CANARY_BUNDLE_NAME
from update_nacl_manifest import CANARY_BUNDLE_NAME


HTTPS_BASE_URL = 'https://storage.googleapis.com' \
Expand Down Expand Up @@ -51,11 +51,6 @@ def GetPlatformArchiveUrl(host_os, version):
return GetArchiveURL(basename, version)


def GetBionicArchiveUrl(version):
basename = 'naclsdk_bionic.tar.bz2'
return GetArchiveURL(basename, version)


def MakeGsUrl(rel_path):
return update_nacl_manifest.GS_BUCKET_PATH + rel_path

Expand Down Expand Up @@ -84,10 +79,6 @@ def MakePlatformArchive(host_os, version):
return MakeArchive(GetPlatformArchiveUrl(host_os, version), host_os)


def MakeBionicArchive(host_os, version):
return MakeArchive(GetBionicArchiveUrl(version), host_os)


def MakeNonPlatformArchive(basename, version):
return MakeArchive(GetArchiveURL(basename, version), 'all')

Expand Down Expand Up @@ -285,9 +276,6 @@ def SendMail(self, subject, text):
B26_0_1386_0_MLW = MakePlatformBundle(26, 177362, V26_0_1386_0, OS_MLW)
B26_0_1386_1_MLW = MakePlatformBundle(26, 177439, V26_0_1386_1, OS_MLW)
BTRUNK_140819_MLW = MakePlatformBundle(21, 140819, VTRUNK_140819, OS_MLW)
BBIONIC_NONE = MakePepperBundle(0, stability=CANARY,
bundle_name=BIONIC_CANARY_BUNDLE_NAME)
BBIONIC_TRUNK_277776 = MakeBionicBundle(37, 277776, VTRUNK_277776, OS_L)
NON_PEPPER_BUNDLE_NOARCHIVES = MakeNonPepperBundle('foo')
NON_PEPPER_BUNDLE_ARCHIVES = MakeNonPepperBundle('bar', with_archives=True)

Expand Down Expand Up @@ -699,18 +687,6 @@ def testBundleWithoutHistoryOrOnlineRaises(self):
self.assertRaises(update_nacl_manifest.UnknownLockedBundleException,
self._Run, OS_MLW)

def testUpdateBionic(self):
bionic_bundle = copy.deepcopy(BBIONIC_NONE)
self.manifest = MakeManifest(bionic_bundle)
self.history.Add(OS_MW, CANARY, V37_0_2054_0)
self.files.Add(BBIONIC_TRUNK_277776)
self.version_mapping[V37_0_2054_0] = VTRUNK_277776
self._MakeDelegate()
self._Run(OS_MLW)
self._ReadUploadedManifest()
self._AssertUploadedManifestHasBundle(BBIONIC_TRUNK_277776, CANARY,
bundle_name=BIONIC_CANARY_BUNDLE_NAME)


class TestUpdateVitals(unittest.TestCase):
def setUp(self):
Expand Down
Loading

0 comments on commit 2bd1f02

Please sign in to comment.