build/gyp.mozbuild

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/build/gyp.mozbuild	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,114 @@
     1.4 +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
     1.5 +# vim: set filetype=python:
     1.6 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.9 +
    1.10 +gyp_vars = {
    1.11 +    'build_with_mozilla': 1,
    1.12 +    'build_with_chromium': 0,
    1.13 +    'use_official_google_api_keys': 0,
    1.14 +    'have_clock_monotonic': 1 if CONFIG['HAVE_CLOCK_MONOTONIC'] else 0,
    1.15 +    'have_ethtool_cmd_speed_hi': 1 if CONFIG['MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI'] else 0,
    1.16 +    'include_alsa_audio': 1 if CONFIG['MOZ_ALSA'] else 0,
    1.17 +    'include_pulse_audio': 1 if CONFIG['MOZ_PULSEAUDIO'] else 0,
    1.18 +    # basic stuff for everything
    1.19 +    'include_internal_video_render': 0,
    1.20 +    'clang_use_chrome_plugins': 0,
    1.21 +    'enable_protobuf': 0,
    1.22 +    'include_tests': 0,
    1.23 +    'enable_android_opensl': 1,
    1.24 +    'enable_android_opensl_output': 0,
    1.25 +    # use_system_lib* still seems to be in use in trunk/build
    1.26 +    'use_system_libjpeg': 0,
    1.27 +    'use_system_libvpx': 0,
    1.28 +    'build_libjpeg': 0,
    1.29 +    'build_libvpx': 0,
    1.30 +    'build_libyuv': 0,
    1.31 +    'libyuv_dir': '/media/libyuv',
    1.32 +    'yuv_disable_avx2': 0 if CONFIG['HAVE_X86_AVX2'] else 1,
    1.33 +
    1.34 +    # saves 4MB when webrtc_trace is off
    1.35 +    'enable_lazy_trace_alloc': 1,
    1.36 +
    1.37 +     # turn off mandatory use of NEON and instead use NEON detection
    1.38 +    'arm_neon': 0,
    1.39 +    'arm_neon_optional': 1,
    1.40 +
    1.41 +    'moz_widget_toolkit_gonk': 0,
    1.42 +    'moz_webrtc_omx': 0,
    1.43 +
    1.44 +    # (for vp8) chromium sets to 0 also
    1.45 +    'use_temporal_layers': 0,
    1.46 +    # Creates AEC internal sample dump files in current directory
    1.47 +    # 'aec_debug_dump': 1,
    1.48 +
    1.49 +    # codec enable/disables:
    1.50 +    'include_g711': 1,
    1.51 +    'include_opus': 1,
    1.52 +    'include_g722': 0,
    1.53 +    'include_ilbc': 0,
    1.54 +    'include_isac': 0,
    1.55 +    'include_pcm16b': 1,
    1.56 +}
    1.57 +
    1.58 +os = CONFIG['OS_TARGET']
    1.59 +
    1.60 +if os == 'WINNT':
    1.61 +    gyp_vars.update(
    1.62 +        MSVS_VERSION=CONFIG['_MSVS_VERSION'],
    1.63 +        MSVS_OS_BITS=64 if CONFIG['HAVE_64BIT_OS'] else 32,
    1.64 +    )
    1.65 +elif os == 'Android':
    1.66 +    if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
    1.67 +        gyp_vars['build_with_gonk'] = 1
    1.68 +        gyp_vars['moz_widget_toolkit_gonk'] = 1
    1.69 +        if int(CONFIG['ANDROID_VERSION']) >= 18:
    1.70 +          gyp_vars['moz_webrtc_omx'] = 1
    1.71 +    else:
    1.72 +        gyp_vars.update(
    1.73 +            gtest_target_type='executable',
    1.74 +            android_toolchain=CONFIG['ANDROID_TOOLCHAIN'],
    1.75 +        )
    1.76 +
    1.77 +flavors = {
    1.78 +    'WINNT': 'win',
    1.79 +    'Android': 'linux' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' else 'android',
    1.80 +    'Linux': 'linux',
    1.81 +    'Darwin': 'mac' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' else 'ios',
    1.82 +    'SunOS': 'solaris',
    1.83 +    'GNU/kFreeBSD': 'freebsd',
    1.84 +    'DragonFly': 'dragonfly',
    1.85 +    'FreeBSD': 'freebsd',
    1.86 +    'NetBSD': 'netbsd',
    1.87 +    'OpenBSD': 'openbsd',
    1.88 +}
    1.89 +gyp_vars['OS'] = flavors[os]
    1.90 +
    1.91 +arches = {
    1.92 +    'x86_64': 'x64',
    1.93 +    'x86': 'ia32',
    1.94 +}
    1.95 +
    1.96 +gyp_vars['target_arch'] = arches.get(CONFIG['CPU_ARCH'], CONFIG['CPU_ARCH'])
    1.97 +
    1.98 +if CONFIG['ARM_ARCH']:
    1.99 +    if int(CONFIG['ARM_ARCH']) < 7:
   1.100 +        gyp_vars['armv7'] = 0
   1.101 +        gyp_vars['arm_neon_optional'] = 0
   1.102 +    elif os == 'Android':
   1.103 +        gyp_vars['armv7'] = 1
   1.104 +    else:
   1.105 +        # CPU detection for ARM works on Android only.  armv7 always uses CPU
   1.106 +        # detection, so we have to set armv7=0 for non-Android target
   1.107 +        gyp_vars['armv7'] = 0
   1.108 +    # For libyuv
   1.109 +    gyp_vars['arm_version'] = CONFIG['ARM_ARCH']
   1.110 +
   1.111 +# Don't try to compile ssse3/sse4.1 code if toolchain doesn't support
   1.112 +if CONFIG['INTEL_ARCHITECTURE']:
   1.113 +    if not CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSSE3'] or not CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSE4_1']:
   1.114 +        gyp_vars['yuv_disable_asm'] = 1
   1.115 +
   1.116 +if CONFIG['MACOS_SDK_DIR']:
   1.117 +    gyp_vars['mac_sdk_path'] = CONFIG['MACOS_SDK_DIR']

mercurial