Bumping manifests a=b2g-bump
[gecko.git] / build / gyp.mozbuild
blob950804ae45497f49f150257dbd978bb1b7cb9924
1 # -*- Mode: python; c-basic-offset: 4; 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 gyp_vars = {
8     'build_with_mozilla': 1,
9     'build_with_chromium': 0,
10     'use_official_google_api_keys': 0,
11     'have_clock_monotonic': 1 if CONFIG['HAVE_CLOCK_MONOTONIC'] else 0,
12     'have_ethtool_cmd_speed_hi': 1 if CONFIG['MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI'] else 0,
13     'include_alsa_audio': 1 if CONFIG['MOZ_ALSA'] else 0,
14     'include_pulse_audio': 1 if CONFIG['MOZ_PULSEAUDIO'] else 0,
15     # basic stuff for everything
16     'include_internal_video_render': 0,
17     'clang_use_chrome_plugins': 0,
18     'enable_protobuf': 0,
19     'include_tests': 0,
20     'enable_android_opensl': 1,
21     'enable_android_opensl_output': 0,
22     # use_system_lib* still seems to be in use in trunk/build
23     'use_system_libjpeg': 0,
24     'use_system_libvpx': 0,
25     'build_libjpeg': 0,
26     'build_libvpx': 0,
27     'build_libyuv': 0,
28     'libyuv_dir': '/media/libyuv',
29     'yuv_disable_avx2': 0 if CONFIG['HAVE_X86_AVX2'] else 1,
30     # don't use openssl
31     'use_openssl': 0,
33     # saves 4MB when webrtc_trace is off
34     'enable_lazy_trace_alloc': 1 if CONFIG['RELEASE_BUILD'] else 0,
36     'use_x11': 1 if CONFIG['MOZ_X11'] else 0,
37     'use_glib': 1 if CONFIG['GLIB_LIBS'] else 0,
39      # turn off mandatory use of NEON and instead use NEON detection
40     'arm_neon': 0,
41     'arm_neon_optional': 1,
43     'moz_widget_toolkit_gonk': 0,
44     'moz_webrtc_omx': 0,
46     # (for vp8) chromium sets to 0 also
47     'use_temporal_layers': 0,
49     # Creates AEC internal sample dump files in current directory
50     'aec_debug_dump': 1,
52     # Enable and force use of hardware AEC
53     'hardware_aec_ns': 1 if CONFIG['MOZ_WEBRTC_HARDWARE_AEC_NS'] else 0,
55     # codec enable/disables:
56     'include_g711': 1,
57     'include_opus': 1,
58     'include_g722': 1,
59     'include_ilbc': 0,
60     'include_isac': 0,
61     'include_pcm16b': 1,
64 os = CONFIG['OS_TARGET']
66 if os == 'WINNT':
67     gyp_vars.update(
68         MSVS_VERSION=CONFIG['_MSVS_VERSION'],
69         MSVS_OS_BITS=64 if CONFIG['HAVE_64BIT_BUILD'] else 32,
70     )
71 elif os == 'Android':
72     if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
73         gyp_vars['build_with_gonk'] = 1
74         gyp_vars['moz_widget_toolkit_gonk'] = 1
75         gyp_vars['opus_complexity'] = 1
76         if int(CONFIG['ANDROID_VERSION']) >= 18:
77           gyp_vars['moz_webrtc_omx'] = 1
78     else:
79         gyp_vars.update(
80             gtest_target_type='executable',
81             android_toolchain=CONFIG['ANDROID_TOOLCHAIN'],
82         )
84 flavors = {
85     'WINNT': 'win',
86     'Android': 'linux' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' else 'android',
87     'Linux': 'linux',
88     'Darwin': 'mac' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' else 'ios',
89     'SunOS': 'solaris',
90     'GNU/kFreeBSD': 'freebsd',
91     'DragonFly': 'dragonfly',
92     'FreeBSD': 'freebsd',
93     'NetBSD': 'netbsd',
94     'OpenBSD': 'openbsd',
96 gyp_vars['OS'] = flavors[os]
98 arches = {
99     'x86_64': 'x64',
100     'x86': 'ia32',
103 gyp_vars['target_arch'] = arches.get(CONFIG['CPU_ARCH'], CONFIG['CPU_ARCH'])
105 if CONFIG['ARM_ARCH']:
106     if int(CONFIG['ARM_ARCH']) < 7:
107         gyp_vars['armv7'] = 0
108         gyp_vars['arm_neon_optional'] = 0
109     elif os == 'Android':
110         gyp_vars['armv7'] = 1
111     else:
112         # CPU detection for ARM works on Android only.  armv7 always uses CPU
113         # detection, so we have to set armv7=0 for non-Android target
114         gyp_vars['armv7'] = 0
115     # For libyuv
116     gyp_vars['arm_version'] = int(CONFIG['ARM_ARCH'])
118 # Don't try to compile ssse3/sse4.1 code if toolchain doesn't support
119 if CONFIG['INTEL_ARCHITECTURE']:
120     if not CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSSE3'] or not CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSE4_1']:
121         gyp_vars['yuv_disable_asm'] = 1
123 if CONFIG['MACOS_SDK_DIR']:
124     gyp_vars['mac_sdk_path'] = CONFIG['MACOS_SDK_DIR']