2016-07-14 16:16:42 +00:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-12-12 14:41:05 +00:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
|
|
|
gyp_vars = {
|
2015-11-18 20:03:25 +00:00
|
|
|
'lsan': 0,
|
|
|
|
'asan': 0,
|
2013-12-12 14:41:05 +00:00
|
|
|
'build_with_mozilla': 1,
|
|
|
|
'build_with_chromium': 0,
|
2014-05-09 18:40:32 +00:00
|
|
|
'use_official_google_api_keys': 0,
|
2013-12-12 14:41:05 +00:00
|
|
|
'have_clock_monotonic': 1 if CONFIG['HAVE_CLOCK_MONOTONIC'] else 0,
|
|
|
|
'have_ethtool_cmd_speed_hi': 1 if CONFIG['MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI'] else 0,
|
|
|
|
'include_alsa_audio': 1 if CONFIG['MOZ_ALSA'] else 0,
|
|
|
|
'include_pulse_audio': 1 if CONFIG['MOZ_PULSEAUDIO'] else 0,
|
|
|
|
# basic stuff for everything
|
|
|
|
'include_internal_video_render': 0,
|
|
|
|
'clang_use_chrome_plugins': 0,
|
|
|
|
'enable_protobuf': 0,
|
|
|
|
'include_tests': 0,
|
|
|
|
'enable_android_opensl': 1,
|
2014-02-26 18:55:07 +00:00
|
|
|
'enable_android_opensl_output': 0,
|
2013-12-12 14:41:05 +00:00
|
|
|
# use_system_lib* still seems to be in use in trunk/build
|
|
|
|
'use_system_libjpeg': 0,
|
|
|
|
'use_system_libvpx': 0,
|
2015-01-29 23:33:36 +00:00
|
|
|
'build_json': 0,
|
2013-12-12 14:41:05 +00:00
|
|
|
'build_libjpeg': 0,
|
2014-01-31 00:55:04 +00:00
|
|
|
'build_libyuv': 0,
|
2015-01-29 23:33:36 +00:00
|
|
|
'build_libvpx': 0,
|
|
|
|
'build_ssl': 0,
|
2015-11-18 20:03:25 +00:00
|
|
|
'build_json': 0,
|
|
|
|
'build_icu': 0,
|
|
|
|
'build_opus': 0,
|
2014-01-31 00:55:04 +00:00
|
|
|
'libyuv_dir': '/media/libyuv',
|
2014-01-31 00:55:09 +00:00
|
|
|
'yuv_disable_avx2': 0 if CONFIG['HAVE_X86_AVX2'] else 1,
|
2014-05-29 21:05:14 +00:00
|
|
|
# don't use openssl
|
|
|
|
'use_openssl': 0,
|
2014-01-31 00:55:04 +00:00
|
|
|
|
2014-08-01 09:42:00 +00:00
|
|
|
'use_x11': 1 if CONFIG['MOZ_X11'] else 0,
|
|
|
|
'use_glib': 1 if CONFIG['GLIB_LIBS'] else 0,
|
|
|
|
|
2013-12-12 14:41:05 +00:00
|
|
|
# turn off mandatory use of NEON and instead use NEON detection
|
|
|
|
'arm_neon': 0,
|
2014-02-04 21:08:43 +00:00
|
|
|
'arm_neon_optional': 1,
|
2013-12-12 14:41:05 +00:00
|
|
|
|
|
|
|
'moz_widget_toolkit_gonk': 0,
|
2014-04-23 00:59:00 +00:00
|
|
|
'moz_webrtc_omx': 0,
|
2014-12-10 03:06:06 +00:00
|
|
|
'moz_webrtc_mediacodec': 0,
|
2013-12-12 14:41:05 +00:00
|
|
|
|
2015-09-03 05:24:00 +00:00
|
|
|
# Turn off multi monitor screen share
|
|
|
|
'multi_monitor_screenshare%' : 0,
|
|
|
|
|
2013-12-12 14:41:05 +00:00
|
|
|
# (for vp8) chromium sets to 0 also
|
|
|
|
'use_temporal_layers': 0,
|
2014-09-24 17:11:58 +00:00
|
|
|
|
2013-12-12 14:41:05 +00:00
|
|
|
# Creates AEC internal sample dump files in current directory
|
2015-02-12 12:46:59 +00:00
|
|
|
'aec_debug_dump': 1,
|
2013-12-12 14:41:05 +00:00
|
|
|
|
2014-09-24 17:11:58 +00:00
|
|
|
# Enable and force use of hardware AEC
|
|
|
|
'hardware_aec_ns': 1 if CONFIG['MOZ_WEBRTC_HARDWARE_AEC_NS'] else 0,
|
|
|
|
|
2013-12-12 14:41:05 +00:00
|
|
|
# codec enable/disables:
|
|
|
|
'include_g711': 1,
|
|
|
|
'include_opus': 1,
|
2014-08-03 04:10:09 +00:00
|
|
|
'include_g722': 1,
|
2013-12-12 14:41:05 +00:00
|
|
|
'include_ilbc': 0,
|
2015-11-18 20:03:25 +00:00
|
|
|
# We turn on ISAC because the AGC uses parts of it, and depend on the
|
|
|
|
# linker to throw away uneeded bits.
|
|
|
|
'include_isac': 1,
|
2013-12-12 14:41:05 +00:00
|
|
|
'include_pcm16b': 1,
|
|
|
|
}
|
|
|
|
|
|
|
|
os = CONFIG['OS_TARGET']
|
|
|
|
|
|
|
|
if os == 'WINNT':
|
|
|
|
gyp_vars.update(
|
|
|
|
MSVS_VERSION=CONFIG['_MSVS_VERSION'],
|
2014-06-25 02:16:25 +00:00
|
|
|
MSVS_OS_BITS=64 if CONFIG['HAVE_64BIT_BUILD'] else 32,
|
2013-12-12 14:41:05 +00:00
|
|
|
)
|
|
|
|
elif os == 'Android':
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
|
|
|
gyp_vars['build_with_gonk'] = 1
|
|
|
|
gyp_vars['moz_widget_toolkit_gonk'] = 1
|
2014-07-01 09:10:44 +00:00
|
|
|
gyp_vars['opus_complexity'] = 1
|
2014-04-23 00:59:00 +00:00
|
|
|
if int(CONFIG['ANDROID_VERSION']) >= 18:
|
|
|
|
gyp_vars['moz_webrtc_omx'] = 1
|
2013-12-12 14:41:05 +00:00
|
|
|
else:
|
|
|
|
gyp_vars.update(
|
|
|
|
gtest_target_type='executable',
|
2014-12-10 03:06:06 +00:00
|
|
|
moz_webrtc_mediacodec=1,
|
2016-04-02 02:23:40 +00:00
|
|
|
android_toolchain=CONFIG.get('ANDROID_TOOLCHAIN', ''),
|
2013-12-12 14:41:05 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
flavors = {
|
|
|
|
'WINNT': 'win',
|
|
|
|
'Android': 'linux' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' else 'android',
|
|
|
|
'Linux': 'linux',
|
|
|
|
'Darwin': 'mac' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' else 'ios',
|
|
|
|
'SunOS': 'solaris',
|
2014-05-19 23:48:15 +00:00
|
|
|
'GNU/kFreeBSD': 'freebsd',
|
2013-12-12 14:41:05 +00:00
|
|
|
'DragonFly': 'dragonfly',
|
|
|
|
'FreeBSD': 'freebsd',
|
|
|
|
'NetBSD': 'netbsd',
|
|
|
|
'OpenBSD': 'openbsd',
|
|
|
|
}
|
2015-02-26 18:21:52 +00:00
|
|
|
gyp_vars['OS'] = flavors.get(os)
|
2013-12-12 14:41:05 +00:00
|
|
|
|
|
|
|
arches = {
|
|
|
|
'x86_64': 'x64',
|
|
|
|
'x86': 'ia32',
|
2016-10-21 05:48:24 +00:00
|
|
|
'aarch64': 'arm64',
|
2013-12-12 14:41:05 +00:00
|
|
|
}
|
|
|
|
|
2014-05-18 09:34:22 +00:00
|
|
|
gyp_vars['target_arch'] = arches.get(CONFIG['CPU_ARCH'], CONFIG['CPU_ARCH'])
|
2013-12-12 14:41:05 +00:00
|
|
|
|
|
|
|
if CONFIG['ARM_ARCH']:
|
2013-12-17 02:12:15 +00:00
|
|
|
if int(CONFIG['ARM_ARCH']) < 7:
|
2013-12-12 14:41:05 +00:00
|
|
|
gyp_vars['armv7'] = 0
|
2014-02-04 21:08:43 +00:00
|
|
|
gyp_vars['arm_neon_optional'] = 0
|
2013-12-12 14:41:05 +00:00
|
|
|
elif os == 'Android':
|
|
|
|
gyp_vars['armv7'] = 1
|
|
|
|
else:
|
|
|
|
# CPU detection for ARM works on Android only. armv7 always uses CPU
|
|
|
|
# detection, so we have to set armv7=0 for non-Android target
|
|
|
|
gyp_vars['armv7'] = 0
|
2014-01-16 22:08:01 +00:00
|
|
|
# For libyuv
|
2014-08-25 19:39:04 +00:00
|
|
|
gyp_vars['arm_version'] = int(CONFIG['ARM_ARCH'])
|
2013-12-12 14:41:05 +00:00
|
|
|
|
|
|
|
# Don't try to compile ssse3/sse4.1 code if toolchain doesn't support
|
|
|
|
if CONFIG['INTEL_ARCHITECTURE']:
|
|
|
|
if not CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSSE3'] or not CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSE4_1']:
|
|
|
|
gyp_vars['yuv_disable_asm'] = 1
|
|
|
|
|
|
|
|
if CONFIG['MACOS_SDK_DIR']:
|
|
|
|
gyp_vars['mac_sdk_path'] = CONFIG['MACOS_SDK_DIR']
|