aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules/flavor/gn_chromebook_flavor.py
diff options
context:
space:
mode:
Diffstat (limited to 'infra/bots/recipe_modules/flavor/gn_chromebook_flavor.py')
-rw-r--r--infra/bots/recipe_modules/flavor/gn_chromebook_flavor.py93
1 files changed, 0 insertions, 93 deletions
diff --git a/infra/bots/recipe_modules/flavor/gn_chromebook_flavor.py b/infra/bots/recipe_modules/flavor/gn_chromebook_flavor.py
index f837378479..984eccef25 100644
--- a/infra/bots/recipe_modules/flavor/gn_chromebook_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_chromebook_flavor.py
@@ -67,99 +67,6 @@ class GNChromebookFlavorUtils(gn_flavor.GNFlavorUtils):
self.create_clean_device_dir(self._bin_dir)
- def compile(self, unused_target):
- configuration = self.m.vars.builder_cfg.get('configuration')
- os = self.m.vars.builder_cfg.get('os')
- target_arch = self.m.vars.builder_cfg.get('target_arch')
-
- clang_linux = self.m.vars.slave_dir.join('clang_linux')
- # This is a pretty typical arm-linux-gnueabihf sysroot
- sysroot_dir = self.m.vars.slave_dir.join('armhf_sysroot')
-
- if 'arm' == target_arch:
- # This is the extra things needed to link against for the chromebook.
- # For example, the Mali GL drivers.
- gl_dir = self.m.vars.slave_dir.join('chromebook_arm_gles')
- env = {'LD_LIBRARY_PATH': sysroot_dir.join('lib')}
- extra_asmflags = [
- '--target=armv7a-linux-gnueabihf',
- '--sysroot=%s' % sysroot_dir,
- '-march=armv7-a',
- '-mfpu=neon',
- '-mthumb',
- ]
-
- extra_cflags = [
- '--target=armv7a-linux-gnueabihf',
- '--sysroot=%s' % sysroot_dir,
- '-I%s' % gl_dir.join('include'),
- '-I%s' % sysroot_dir.join('include'),
- '-I%s' % sysroot_dir.join('include', 'c++', '4.8.4'),
- '-I%s' % sysroot_dir.join('include', 'c++', '4.8.4',
- 'arm-linux-gnueabihf'),
- '-DMESA_EGL_NO_X11_HEADERS',
- ]
-
- extra_ldflags = [
- '--target=armv7a-linux-gnueabihf',
- '--sysroot=%s' % sysroot_dir,
- # use sysroot's ld which can properly link things.
- '-B%s' % sysroot_dir.join('bin'),
- # helps locate crt*.o
- '-B%s' % sysroot_dir.join('gcc-cross'),
- # helps locate libgcc*.so
- '-L%s' % sysroot_dir.join('gcc-cross'),
- '-L%s' % sysroot_dir.join('lib'),
- '-L%s' % gl_dir.join('lib'),
- # Explicitly do not use lld for cross compiling like this - I observed
- # failures like "Unrecognized reloc 41" and couldn't find out why.
- ]
- else:
- gl_dir = self.m.vars.slave_dir.join('chromebook_x86_64_gles')
- env = {}
- extra_asmflags = []
- extra_cflags = [
- '-DMESA_EGL_NO_X11_HEADERS',
- '-I%s' % gl_dir.join('include'),
- ]
- extra_ldflags = [
- '-L%s' % gl_dir.join('lib'),
- '-static-libstdc++', '-static-libgcc',
- '-fuse-ld=lld',
- ]
-
- quote = lambda x: '"%s"' % x
- args = {
- 'cc': quote(clang_linux.join('bin','clang')),
- 'cxx': quote(clang_linux.join('bin','clang++')),
- 'target_cpu': quote(target_arch),
- 'skia_use_fontconfig': 'false',
- 'skia_use_system_freetype2': 'false',
- 'skia_use_egl': 'true',
- }
- extra_cflags.append('-DDUMMY_clang_linux_version=%s' %
- self.m.run.asset_version('clang_linux'))
-
- if configuration != 'Debug':
- args['is_debug'] = 'false'
- args['extra_asmflags'] = repr(extra_asmflags).replace("'", '"')
- args['extra_cflags'] = repr(extra_cflags).replace("'", '"')
- args['extra_ldflags'] = repr(extra_ldflags).replace("'", '"')
-
- gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted(args.iteritems()))
-
- gn = 'gn.exe' if 'Win' in os else 'gn'
- ninja = 'ninja.exe' if 'Win' in os else 'ninja'
- gn = self.m.vars.skia_dir.join('bin', gn)
-
- with self.m.context(cwd=self.m.vars.skia_dir,
- env=env):
- self._py('fetch-gn', self.m.vars.skia_dir.join('bin', 'fetch-gn'))
- self._run('gn gen', [gn, 'gen', self.out_dir, '--args=' + gn_args])
- self._run('ninja', [ninja, '-k', '0'
- , '-C', self.out_dir
- , 'nanobench', 'dm'])
-
def create_clean_device_dir(self, path):
# use -f to silently return if path doesn't exist
self._ssh('rm %s' % path, 'rm', '-rf', path)