示例#1
0
def webrtc_android_apk_try_builder(c):
    """ Configure patch manipulation for WebRTC Android APK trybots."""
    c.patch_root_dir = Path('[CHECKOUT]', 'third_party', 'webrtc')
    c.patch_filter_script = Path('[BUILD]', 'scripts', 'slave',
                                 'patch_path_filter.py')
    c.patch_path_filter = 'webrtc/'
    c.patch_strip_level = 1
示例#2
0
def msvs(c):
    if c.HOST_PLATFORM != 'win':
        raise BadConf('can not use msvs on "%s"' % c.HOST_PLATFORM)
    # If compile.py is invoking devenv it needs to refer to a solution file.
    # For chrome this defaults to ['CHECKOUT']/build/all.sln.
    c.compile_py.solution = Path('[CHECKOUT]', 'build', 'all.sln')
    c.gyp_env.GYP_GENERATORS.add('msvs')
    c.compile_py.build_tool = 'vs'
    c.build_dir = Path('[CHECKOUT]', 'build')
示例#3
0
def BaseConfig(INTERNAL=False,
               REPO_NAME=None,
               REPO_URL=None,
               BUILD_CONFIG='Debug',
               REVISION='',
               **_kwargs):
    return ConfigGroup(
        INTERNAL=Static(INTERNAL),
        REPO_NAME=Static(REPO_NAME),
        REPO_URL=Static(REPO_URL),
        BUILD_CONFIG=Static(BUILD_CONFIG),
        revision=Single(basestring, empty_val=REVISION),
        run_stack_tool_steps=Single(bool, required=False, empty_val=False),
        asan_symbolize=Single(bool, required=False, empty_val=False),
        get_app_manifest_vars=Single(bool, required=False, empty_val=True),
        run_tree_truth=Single(bool, required=False, empty_val=True),
        deps_file=Single(basestring, required=False, empty_val='.DEPS.git'),
        internal_dir_name=Single(basestring, required=False),
        # deps_dir: where to checkout the gclient deps file
        deps_dir=Single(basestring, required=False, empty_val=REPO_NAME),
        managed=Single(bool, required=False, empty_val=True),
        extra_deploy_opts=List(inner_type=basestring),
        tests=List(inner_type=basestring),
        cr_build_android=Static(Path('[CHECKOUT]', 'build', 'android')),
        gclient_custom_deps=Dict(value_type=(basestring, types.NoneType)),
        storage_bucket=Single(basestring),
        channel=Single(basestring, empty_val='chrome'),
        upload_dest_prefix=Single(basestring, empty_val=''),
        gclient_custom_vars=Dict(value_type=(basestring, types.NoneType)),
        coverage=Single(bool, required=False, empty_val=False))
示例#4
0
def msvs(c):
    if c.HOST_PLATFORM != 'win':
        raise BadConf('can not use msvs on "%s"' % c.HOST_PLATFORM)
    c.gyp_env.GYP_GENERATORS.add('msvs')
    c.gyp_env.GYP_GENERATOR_FLAGS['msvs_error_on_missing_sources'] = 1
    c.compile_py.build_tool = 'msvs'
    c.build_dir = Path('[CHECKOUT]', 'build')
def libyuv(c):
  _libyuv_common(c)

  c.runtests.memory_tests_runner = Path('[CHECKOUT]', 'tools',
                                        'valgrind-libyuv', 'libyuv_tests',
                                        platform_ext={'win': '.bat',
                                                      'mac': '.sh',
                                                      'linux': '.sh'})
def webrtc(c):
  _compiler_defaults(c)

  c.runtests.memory_tests_runner = Path('[CHECKOUT]', 'tools',
                                        'valgrind-webrtc', 'webrtc_tests',
                                        platform_ext={'win': '.bat',
                                                      'mac': '.sh',
                                                      'linux': '.sh'})
示例#7
0
def ninja(c):
    if c.TARGET_PLATFORM == 'ios':
        c.gyp_env.GYP_GENERATORS.add('ninja')

    c.compile_py.build_tool = 'ninja'

    out_path = 'out'
    if c.TARGET_CROS_BOARD:
        out_path += '_%s' % (c.TARGET_CROS_BOARD, )
    c.build_dir = Path('[CHECKOUT]', out_path)
示例#8
0
def asan(c):
    if 'clang' not in c.compile_py.compiler:  # pragma: no cover
        raise BadConf('asan requires clang')
    c.runtests.lsan_suppressions_file = Path('[CHECKOUT]', 'tools', 'lsan',
                                             'suppressions.txt')
    if c.TARGET_PLATFORM == 'linux':
        c.gyp_env.GYP_DEFINES['use_allocator'] = 'none'

    c.gyp_env.GYP_DEFINES['asan'] = 1
    c.gyp_env.GYP_DEFINES['lsan'] = 1
示例#9
0
def BaseConfig(**_kwargs):
    return ConfigGroup(
        patch_root_dir=Single(Path,
                              required=False,
                              empty_val=Path('[CHECKOUT]')),

        # Allow manipulating patches for try jobs.
        patch_filter_script=Single(Path, required=False),
        patch_path_filter=Single(basestring, required=False),
        patch_strip_level=Single(int, required=False, empty_val=0),
    )
示例#10
0
def webrtc(c):
    c.compile_py.default_targets = ['All']

    c.memory_tests_runner = Path('[CHECKOUT]',
                                 'tools',
                                 'valgrind-webrtc',
                                 'webrtc_tests',
                                 platform_ext={
                                     'win': '.bat',
                                     'mac': '.sh',
                                     'linux': '.sh'
                                 })
示例#11
0
def v8(c):
    targ_arch = c.gyp_env.GYP_DEFINES.get('target_arch')
    if not targ_arch:  # pragma: no cover
        raise recipe_config.BadConf('v8 must have a valid target_arch.')
    c.gyp_env.GYP_DEFINES['v8_target_arch'] = targ_arch
    del c.gyp_env.GYP_DEFINES['component']
    c.build_dir = Path('[CHECKOUT]', 'out')
    c.compile_py.build_tool = 'make'

    if c.HOST_PLATFORM == 'mac':
        c.compile_py.build_tool = 'xcode'
    elif c.HOST_PLATFORM == 'win':
        c.compile_py.build_tool = 'vs'
        c.build_dir = Path('[CHECKOUT]', 'build')

    if c.BUILD_CONFIG == 'Debug':
        c.gyp_env.GYP_DEFINES['v8_optimized_debug'] = 1

    # Chromium adds '_x64' to the output folder, which is neither needed nor
    # understood when compiling v8 standalone.
    if c.HOST_PLATFORM == 'win' and c.TARGET_BITS == 64:
        c.build_config_fs = c.BUILD_CONFIG
        c.compile_py.pass_arch_flag = True
示例#12
0
def BaseConfig(USE_MIRROR=False):
  chromium_in_android_subpath = ('external', 'chromium_org')
  build_path = Path('[SLAVE_BUILD]', 'android-src')

  return ConfigGroup(
    lunch_flavor = Single(basestring),
    repo = ConfigGroup(
      url = Single(basestring),
      branch = Single(basestring),
      sync_flags = List(basestring),
    ),
    USE_MIRROR = Static(bool(USE_MIRROR)),
    # If present causes the sync step to use the specified manifest instead of
    # the one associated with the repo.branch.
    sync_manifest_override = Single(Path, required=False),

    # Path stuff
    chromium_in_android_subpath = Static('/'.join(chromium_in_android_subpath)),
    build_path = Static(build_path),
    slave_chromium_in_android_path = Static(
      build_path.join(*chromium_in_android_subpath)),
    slave_android_out_path = Static(build_path.join('out')),
  )
示例#13
0
def BaseConfig(USE_MIRROR=False):
    chromium_in_android_subpath = ('external', 'chromium_org')
    build_path = Path('[SLAVE_BUILD]', 'android-src')

    return ConfigGroup(
        lunch_flavor=Single(basestring),
        repo=ConfigGroup(
            url=Single(basestring),
            branch=Single(basestring),
            sync_flags=List(basestring),
        ),
        USE_MIRROR=Static(bool(USE_MIRROR)),
        # If present causes the sync step to use the specified manifest instead of
        # the one associated with the repo.branch.
        sync_manifest_override=Single(Path, required=False),

        # Path stuff
        chromium_in_android_subpath=Static(
            '/'.join(chromium_in_android_subpath)),
        build_path=Static(build_path),
        slave_chromium_in_android_path=Static(
            build_path.join(*chromium_in_android_subpath)),
        slave_android_out_path=Static(build_path.join('out')),
    )
示例#14
0
def goma(c):
    if c.compile_py.build_tool == 'vs':  # pragma: no cover
        raise BadConf('goma doesn\'t work with msvs')

    # TODO(iannucci): support clang and jsonclang
    if not c.compile_py.compiler:
        c.compile_py.compiler = 'goma'
    elif c.compile_py.compiler == 'clang':
        c.compile_py.compiler = 'goma-clang'
    else:  # pragma: no cover
        raise BadConf('goma config dosen\'t understand %s' %
                      c.compile_py.compiler)

    c.gyp_env.GYP_DEFINES['use_goma'] = 1

    goma_dir = Path('[BUILD]', 'goma')
    c.gyp_env.GYP_DEFINES['gomadir'] = goma_dir
    c.compile_py.goma_dir = goma_dir

    if c.TARGET_PLATFORM == 'win':
        fastbuild(c)
        pch(c, invert=True)
示例#15
0
def BASE(c):
    host_targ_tuples = [(c.HOST_PLATFORM, c.HOST_ARCH, c.HOST_BITS),
                        (c.TARGET_PLATFORM, c.TARGET_ARCH, c.TARGET_BITS)]

    for (plat, arch, bits) in host_targ_tuples:
        if plat == 'ios':
            if arch not in ('arm', 'intel'):
                raise BadConf('%s/%s arch is not supported on %s' %
                              (arch, bits, plat))
        elif plat in ('win', 'mac'):
            if arch != 'intel':
                raise BadConf('%s arch is not supported on %s' % (arch, plat))
        elif plat in ('chromeos', 'android', 'linux'):
            pass  # no arch restrictions
        else:  # pragma: no cover
            assert False, "Not covering a platform: %s" % plat

    potential_platforms = {
        # host -> potential target platforms
        'win': ('win', ),
        'mac': ('mac', 'ios'),
        'linux': ('linux', 'chromeos', 'android'),
    }.get(c.HOST_PLATFORM)

    if not potential_platforms:  # pragma: no cover
        raise BadConf('Cannot build on "%s"' % c.HOST_PLATFORM)

    if c.TARGET_PLATFORM not in potential_platforms:
        raise BadConf('Can not compile "%s" on "%s"' %
                      (c.TARGET_PLATFORM, c.HOST_PLATFORM))

    if c.TARGET_CROS_BOARD:
        if not c.TARGET_PLATFORM == 'chromeos':
            raise BadConf(
                "Cannot specify CROS board for non-'chromeos' platform")

    if c.HOST_PLATFORM != c.TARGET_PLATFORM:
        c.gyp_env.GYP_CROSSCOMPILE = 1

    if c.HOST_BITS < c.TARGET_BITS:
        raise BadConf('host bits < targ bits')

    c.build_config_fs = c.BUILD_CONFIG
    if c.HOST_PLATFORM == 'win':
        if c.TARGET_BITS == 64:
            # Windows requires 64-bit builds to be in <dir>_x64.
            c.build_config_fs = c.BUILD_CONFIG + '_x64'

    # Test runner memory tools that are not compile-time based.
    c.runtests.memory_tests_runner = Path('[CHECKOUT]',
                                          'tools',
                                          'valgrind',
                                          'chrome_tests',
                                          platform_ext={
                                              'win': '.bat',
                                              'mac': '.sh',
                                              'linux': '.sh'
                                          })

    if c.project_generator.tool not in PROJECT_GENERATORS:  # pragma: no cover
        raise BadConf('"%s" is not a supported project generator tool, the '
                      'supported ones are: %s' %
                      (c.project_generator.tool, ','.join(PROJECT_GENERATORS)))
    gyp_arch = {
        ('intel', 32): 'ia32',
        ('intel', 64): 'x64',
        ('arm', 32): 'arm',
        ('arm', 64): 'arm64',
        ('mipsel', 32): 'mipsel',
        ('mipsel', 64): 'mipsel',
    }.get((c.TARGET_ARCH, c.TARGET_BITS))
    if gyp_arch:
        c.gyp_env.GYP_DEFINES['target_arch'] = gyp_arch

    if c.BUILD_CONFIG in ['Coverage', 'Release']:
        # The 'Coverage' target is not explicitly used by Chrome, but by some other
        # projects in the Chrome ecosystem (ie: Syzygy).
        static_library(c, final=False)
    elif c.BUILD_CONFIG == 'Debug':
        shared_library(c, final=False)
    else:  # pragma: no cover
        raise BadConf('Unknown build config "%s"' % c.BUILD_CONFIG)
示例#16
0
def arm_builder(c):
    gyp_defs = c.gyp_env.GYP_DEFINES
    gyp_defs['android_sdk_build_tools_version'] = '19.0.0'
    gyp_defs['android_sdk_version'] = '19'
    gyp_defs['android_sdk_root'] = Path('[CHECKOUT]', 'third_party',
                                        'android_tools', 'sdk')
示例#17
0
def AOSP_webview(c):
    c.sync_manifest_override = Path('[CHECKOUT]', 'android_webview',
                                    'buildbot', 'aosp_manifest.xml')
示例#18
0
def test(c):
    c.name = 'test'
    c.cmd = [Path('[CHECKOUT]', 'build', 'tools', 'cool_script.py')]
示例#19
0
def ninja(c):
    if c.TARGET_PLATFORM == 'ios':
        c.gyp_env.GYP_GENERATORS.add('ninja')

    c.compile_py.build_tool = 'ninja'
    c.build_dir = Path('[CHECKOUT]', 'out')
示例#20
0
def BASE(c):
    host_targ_tuples = [(c.HOST_PLATFORM, c.HOST_ARCH, c.HOST_BITS),
                        (c.TARGET_PLATFORM, c.TARGET_ARCH, c.TARGET_BITS)]

    for (plat, arch, bits) in host_targ_tuples:
        if plat == 'ios':
            if arch != 'arm' or bits != 32:
                raise BadConf('iOS only supports arm/32')
        elif plat in ('win', 'mac'):
            if arch != 'intel':
                raise BadConf('%s arch is not supported on %s' % (arch, plat))
        elif plat in ('chromeos', 'android', 'linux'):
            pass  # no arch restrictions
        else:  # pragma: no cover
            assert False, "Not covering a platform: %s" % plat

    potential_platforms = {
        # host -> potential target platforms
        'win': ('win', ),
        'mac': ('mac', 'ios'),
        'linux': ('linux', 'chromeos', 'android'),
    }.get(c.HOST_PLATFORM)

    if not potential_platforms:  # pragma: no cover
        raise BadConf('Cannot build on "%s"' % c.HOST_PLATFORM)

    if c.TARGET_PLATFORM not in potential_platforms:
        raise BadConf('Can not compile "%s" on "%s"' %
                      (c.TARGET_PLATFORM, c.HOST_PLATFORM))

    if c.HOST_PLATFORM != c.TARGET_PLATFORM:
        c.gyp_env.GYP_CROSSCOMPILE = 1

    if c.HOST_BITS < c.TARGET_BITS:
        raise BadConf('host bits < targ bits')

    c.build_config_fs = c.BUILD_CONFIG
    if c.HOST_PLATFORM == 'win':
        if c.TARGET_BITS == 64:
            # Windows requires 64-bit builds to be in <dir>_x64.
            c.build_config_fs = c.BUILD_CONFIG + '_x64'

    c.memory_tests_runner = Path('[CHECKOUT]',
                                 'tools',
                                 'valgrind',
                                 'chrome_tests',
                                 platform_ext={
                                     'win': '.bat',
                                     'mac': '.sh',
                                     'linux': '.sh'
                                 })
    gyp_arch = {
        ('intel', 32): 'ia32',
        ('intel', 64): 'x64',
        ('arm', 32): 'arm',
        ('arm', 64): 'arm64',
        ('mipsel', 32): 'mipsel',
        ('mipsel', 64): 'mipsel',
    }.get((c.TARGET_ARCH, c.TARGET_BITS))
    if gyp_arch:
        c.gyp_env.GYP_DEFINES['target_arch'] = gyp_arch

    if c.BUILD_CONFIG == 'Release':
        static_library(c, final=False)
    elif c.BUILD_CONFIG == 'Debug':
        shared_library(c, final=False)
    else:  # pragma: no cover
        raise BadConf('Unknown build config "%s"' % c.BUILD_CONFIG)
示例#21
0
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

from RECIPE_MODULES.chromium import CONFIG_CTX
from slave.recipe_config_types import Path

SYZYGY_SLN = Path('[CHECKOUT]', 'syzygy', 'syzygy.sln')
ALL_SLN = Path('[CHECKOUT]', 'syzygy', 'build', 'all.sln')


@CONFIG_CTX(includes=['msvs', 'msvs2013'])
def _syzygy_base(c):
    c.project_generator.tool = 'gyp'

    # We don't use a component build, so remove the GYP define.
    c.gyp_env.GYP_DEFINES.pop('component', None)


@CONFIG_CTX(includes=['_syzygy_base'])
def syzygy(c):
    assert 'official_build' not in c.gyp_env.GYP_DEFINES
    c.compile_py.default_targets.clear()
    c.compile_py.default_targets.add('build_all')
    c.compile_py.solution = SYZYGY_SLN


@CONFIG_CTX(includes=['_syzygy_base'], config_vars={'BUILD_CONFIG': 'Release'})
def syzygy_official(c):
    c.compile_py.clobber = True
    c.compile_py.default_targets.clear()
示例#22
0
def chromium_xcode(c):
    c.compile_py.build_tool = 'xcode'
    c.compile_py.default_targets = ['All']
    c.compile_py.xcode_project = Path('[CHECKOUT]', 'build', 'all.xcodeproj')
示例#23
0
def skia(c):
    c.build_config_fs = c.BUILD_CONFIG
    c.build_dir = Path('[CHECKOUT]', 'out')
示例#24
0
def android_l(c):
    gyp_defs = c.gyp_env.GYP_DEFINES
    gyp_defs['android_sdk_build_tools_version'] = 'android-5.0'
    gyp_defs['android_sdk_version'] = '5.0'
    gyp_defs['android_sdk_root'] = Path('[CHECKOUT]', 'third_party',
                                        'android_tools_internal', 'sdk')
示例#25
0
 def __getitem__(self, name):
   return Path(name, _bypass=True)