diff options
author | Kevin Lubick <kjlubick@google.com> | 2017-11-02 09:34:08 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-02 13:36:21 +0000 |
commit | b718fbb7f411819e47c973ed30bc4fe7cf9fac70 (patch) | |
tree | 63cfe8074cda830a9c675468158132266c2f6664 /infra/bots/recipe_modules/flavor/gn_chromebook_flavor.py | |
parent | af79192aa3cebaeaff039cebd4d17c1524755b91 (diff) |
Add Pixelbook to tree
Bug: skia:7249
NOTRY=true
Change-Id: I7ab6bc28d567ca5ae75df9c1e56b46c307032024
Reviewed-on: https://skia-review.googlesource.com/66143
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Diffstat (limited to 'infra/bots/recipe_modules/flavor/gn_chromebook_flavor.py')
-rw-r--r-- | infra/bots/recipe_modules/flavor/gn_chromebook_flavor.py | 92 |
1 files changed, 54 insertions, 38 deletions
diff --git a/infra/bots/recipe_modules/flavor/gn_chromebook_flavor.py b/infra/bots/recipe_modules/flavor/gn_chromebook_flavor.py index d91314d131..87f4fdccf2 100644 --- a/infra/bots/recipe_modules/flavor/gn_chromebook_flavor.py +++ b/infra/bots/recipe_modules/flavor/gn_chromebook_flavor.py @@ -75,43 +75,59 @@ class GNChromebookFlavorUtils(gn_flavor.GNFlavorUtils): 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') - # 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') - - 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. - ] + + 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', + '-DEGL_NO_IMAGE_EXTERNAL', + '-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 = { @@ -136,7 +152,7 @@ class GNChromebookFlavorUtils(gn_flavor.GNFlavorUtils): gn = self.m.vars.skia_dir.join('bin', gn) with self.m.context(cwd=self.m.vars.skia_dir, - env={'LD_LIBRARY_PATH': sysroot_dir.join('lib')}): + 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, '-C', self.out_dir, 'nanobench', 'dm']) |