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