1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 include('gyp_base.mozbuild')
13 'fuzzing' : 1 if CONFIG['FUZZING'] else 0,
14 'libfuzzer' : 1 if CONFIG['LIBFUZZER'] else 0,
15 'libfuzzer_fuzzer_no_link_flag' : 1 if CONFIG['HAVE_LIBFUZZER_FLAG_FUZZER_NO_LINK'] else 0,
16 'build_with_mozilla': 1,
17 'build_with_chromium': 0,
18 # 10.9 once we move to TC cross-compiles - bug 1270217
19 'mac_sdk_min': '10.9',
20 'mac_deployment_target': '10.9',
21 'use_official_google_api_keys': 0,
22 'have_clock_monotonic': 1 if CONFIG['HAVE_CLOCK_MONOTONIC'] else 0,
23 'have_ethtool_cmd_speed_hi': 1 if CONFIG['MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI'] else 0,
24 'include_alsa_audio': 1 if CONFIG['MOZ_ALSA'] else 0,
25 'include_pulse_audio': 1 if CONFIG['MOZ_PULSEAUDIO'] else 0,
26 # basic stuff for everything
27 'include_internal_video_render': 0,
28 'clang': 1 if CONFIG['CC_TYPE'] == 'clang' else 0,
29 'clang_cl': 1 if CONFIG['CC_TYPE'] == 'clang-cl' else 0,
30 'clang_use_chrome_plugins': 0,
33 'enable_android_opensl': 1,
34 'enable_android_opensl_output': 0,
35 # use_system_lib* still seems to be in use in trunk/build
36 'use_system_libjpeg': 0,
37 'use_system_libvpx': 0,
47 'libyuv_dir': '/media/libyuv/libyuv',
48 'yuv_disable_avx2': 0 if CONFIG['HAVE_X86_AVX2'] else 1,
51 # Must match build/gyp.mozbuild WEBRTC_BUILD_LIBEVENT
52 #'enable_libevent': 0, default according to OS
54 'debug': 1 if CONFIG['DEBUG'] else 0,
56 'use_x11': 1 if CONFIG['MOZ_X11'] else 0,
57 'use_glib': 1 if CONFIG['GLIB_LIBS'] else 0,
58 # bug 1373485 - avoid pkg-config for gtk2 in webrtc
61 # turn off mandatory use of NEON and instead use NEON detection
63 'arm_neon_optional': 1,
65 'moz_webrtc_mediacodec': 0,
67 # Turn off multi monitor screen share
68 'multi_monitor_screenshare%' : 0,
70 # (for vp8) chromium sets to 0 also
71 'use_temporal_layers': 0,
73 # Creates AEC internal sample dump files in current directory
76 # codec enable/disables:
81 # We turn on ISAC because the AGC uses parts of it, and depend on the
82 # linker to throw away uneeded bits.
86 #'rtc_opus_variable_complexity': 1,
93 gtest_target_type='executable',
94 moz_webrtc_mediacodec=1,
95 android_toolchain=CONFIG.get('ANDROID_TOOLCHAIN', ''),
98 if CONFIG['ARM_ARCH']:
99 if int(CONFIG['ARM_ARCH']) < 7:
100 gyp_vars['armv7'] = 0
101 gyp_vars['arm_neon_optional'] = 0
102 elif os == 'Android':
103 gyp_vars['armv7'] = 1
104 gyp_vars['arm_neon'] = 1
105 gyp_vars['build_with_neon'] = 1
107 # CPU detection for ARM works on Android only. armv7 always uses CPU
108 # detection, so we have to set armv7=0 for non-Android target
109 gyp_vars['armv7'] = 0
111 gyp_vars['arm_version'] = int(CONFIG['ARM_ARCH'])
113 # Don't try to compile ssse3/sse4.1 code if toolchain doesn't support
114 if CONFIG['INTEL_ARCHITECTURE']:
115 if not CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSSE3'] or not CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSE4_1']:
116 gyp_vars['yuv_disable_asm'] = 1
118 if CONFIG['MACOS_SDK_DIR']:
119 gyp_vars['mac_sdk_path'] = CONFIG['MACOS_SDK_DIR']
121 if not CONFIG['MOZ_SYSTEM_LIBVPX']:
122 gyp_vars['libvpx_dir'] = '/media/libvpx/libvpx'
124 if not CONFIG['MOZ_SYSTEM_LIBEVENT']:
125 gyp_vars['libevent_dir'] = '/ipc/chromium/src/third_party/libevent'