Bug 1814798 - pt 1. Add bool to enable/disable PHC at runtime r=glandium
[gecko.git] / build / gyp.mozbuild
blob5316582069fbf70b461303a5614d0b33dd948426
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')
9 gyp_vars.update({
10     'lsan': 0,
11     'asan': 0,
12     'tsan': 1 if CONFIG['MOZ_TSAN'] else 0,
13     'ubsan' : 0,
14     'fuzzing' : 1 if CONFIG['FUZZING'] else 0,
15     'libfuzzer' : 1 if CONFIG['LIBFUZZER'] else 0,
16     'libfuzzer_fuzzer_no_link_flag' : 1 if CONFIG['HAVE_LIBFUZZER_FLAG_FUZZER_NO_LINK'] else 0,
17     'build_with_mozilla': 1,
18     'build_with_chromium': 0,
19     # 10.9 once we move to TC cross-compiles - bug 1270217
20     'mac_sdk_min': '10.9',
21     'mac_deployment_target': '10.9',
22     'use_official_google_api_keys': 0,
23     'have_clock_monotonic': 1 if CONFIG['HAVE_CLOCK_MONOTONIC'] else 0,
24     'have_ethtool_cmd_speed_hi': 1 if CONFIG['MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI'] else 0,
25     'include_alsa_audio': 1 if CONFIG['MOZ_ALSA'] else 0,
26     'include_pulse_audio': 1 if CONFIG['MOZ_PULSEAUDIO'] else 0,
27     # basic stuff for everything
28     'include_internal_video_render': 0,
29     'clang': 1 if CONFIG['CC_TYPE'] == 'clang' else 0,
30     'clang_cl': 1 if CONFIG['CC_TYPE'] == 'clang-cl' else 0,
31     'clang_use_chrome_plugins': 0,
32     'enable_protobuf': 0,
33     'include_tests': 0,
34     'enable_android_opensl': 1,
35     'enable_android_opensl_output': 0,
36     # use_system_lib* still seems to be in use in trunk/build
37     'use_system_libjpeg': 0,
38     'use_system_libvpx': 0,
39     'build_json': 0,
40     'build_libjpeg': 0,
41     'build_libyuv': 0,
42     'build_libvpx': 0,
43     'build_libevent': 0,
44     'build_ssl': 0,
45     'build_json': 0,
46     'build_icu': 0,
47     'build_opus': 0,
48     'libyuv_dir': '/media/libyuv/libyuv',
49     # don't use openssl
50     'use_openssl': 0,
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
59     'use_gtk': 0,
61      # turn off mandatory use of NEON and instead use NEON detection
62     'arm_neon': 0,
63     'arm_neon_optional': 1,
65     # (for vp8) chromium sets to 0 also
66     'use_temporal_layers': 0,
68     # Creates AEC internal sample dump files in current directory
69     'aec_debug_dump': 1,
71     # codec enable/disables:
72     'include_g711': 1,
73     'include_opus': 1,
74     'include_g722': 1,
75     'include_ilbc': 0,
76     # We turn on ISAC because the AGC uses parts of it, and depend on the
77     # linker to throw away uneeded bits.
78     'include_isac': 1,
79     'include_pcm16b': 1,
81     #'rtc_opus_variable_complexity': 1,
83     'apm_debug_dump': 1,
86 if os == 'Android':
87     gyp_vars.update(gtest_target_type='executable')
89 if CONFIG['ARM_ARCH']:
90     if int(CONFIG['ARM_ARCH']) < 7:
91         gyp_vars['armv7'] = 0
92         gyp_vars['arm_neon_optional'] = 0
93     elif os == 'Android':
94         gyp_vars['armv7'] = 1
95         gyp_vars['arm_neon'] = 1
96         gyp_vars['build_with_neon'] = 1
97     else:
98         # CPU detection for ARM works on Android only.  armv7 always uses CPU
99         # detection, so we have to set armv7=0 for non-Android target
100         gyp_vars['armv7'] = 0
101     # For libyuv
102     gyp_vars['arm_version'] = int(CONFIG['ARM_ARCH'])
104 if CONFIG['MACOS_SDK_DIR']:
105     gyp_vars['mac_sdk_path'] = CONFIG['MACOS_SDK_DIR']
107 if not CONFIG['MOZ_SYSTEM_LIBVPX']:
108     gyp_vars['libvpx_dir'] =  '/media/libvpx/libvpx'
110 if not CONFIG['MOZ_SYSTEM_LIBEVENT']:
111     gyp_vars['libevent_dir'] = '/ipc/chromium/src/third_party/libevent'