1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 # 3 # Use of this source code is governed by a BSD-style license 4 # that can be found in the LICENSE file in the root of the source 5 # tree. An additional intellectual property rights grant can be found 6 # in the file PATENTS. All contributing project authors may 7 # be found in the AUTHORS file in the root of the source tree. 8 9 import("//build/config/arm.gni") 10 11 declare_args() { 12 # Assume Chromium build for now, since that's the priority case for getting GN 13 # up and running with WebRTC. 14 build_with_chromium = true 15 build_with_libjingle = true 16 17 # Disable this to avoid building the Opus audio codec. 18 rtc_include_opus = true 19 20 # Used to specify an external Jsoncpp include path when not compiling the 21 # library that comes with WebRTC (i.e. rtc_build_json == 0). 22 rtc_jsoncpp_root = "//third_party/jsoncpp/source/include" 23 24 # Used to specify an external OpenSSL include path when not compiling the 25 # library that comes with WebRTC (i.e. rtc_build_ssl == 0). 26 rtc_ssl_root = "" 27 28 # Adds video support to dependencies shared by voice and video engine. 29 # This should normally be enabled; the intended use is to disable only 30 # when building voice engine exclusively. 31 rtc_enable_video = true 32 33 # Selects fixed-point code where possible. 34 rtc_prefer_fixed_point = false 35 36 # Enable data logging. Produces text files with data logged within engines 37 # which can be easily parsed for offline processing. 38 rtc_enable_data_logging = false 39 40 # Enables the use of protocol buffers for debug recordings. 41 rtc_enable_protobuf = true 42 43 # Disable these to not build components which can be externally provided. 44 rtc_build_json = true 45 rtc_build_libjpeg = true 46 rtc_build_libyuv = true 47 rtc_build_libvpx = true 48 rtc_build_ssl = true 49 50 # Disable by default. 51 rtc_have_dbus_glib = false 52 53 # Enable to use the Mozilla internal settings. 54 build_with_mozilla = false 55 56 # Define MIPS architecture variant, MIPS DSP variant and MIPS FPU 57 # This may be subject to change in accordance to Chromium's MIPS flags 58 mips_arch_variant = "mips32r1" 59 mips_dsp_rev = 0 60 mips_fpu = true 61 62 rtc_enable_android_opensl = true 63 64 # Link-Time Optimizations. 65 # Executes code generation at link-time instead of compile-time. 66 # https://gcc.gnu.org/wiki/LinkTimeOptimization 67 rtc_use_lto = false 68 69 if (build_with_chromium) { 70 # Exclude pulse audio on Chromium since its prerequisites don't require 71 # pulse audio. 72 rtc_include_pulse_audio = false 73 74 # Exclude internal ADM since Chromium uses its own IO handling. 75 rtc_include_internal_audio_device = false 76 77 } else { 78 # Settings for the standalone (not-in-Chromium) build. 79 80 # TODO(andrew): For now, disable the Chrome plugins, which causes a 81 # flood of chromium-style warnings. Investigate enabling them: 82 # http://code.google.com/p/webrtc/issues/detail?id=163 83 clang_use_chrome_plugins = false 84 85 rtc_include_pulse_audio = true 86 rtc_include_internal_audio_device = true 87 } 88 89 if (build_with_libjingle) { 90 rtc_include_tests = false 91 rtc_restrict_logging = true 92 } else { 93 rtc_include_tests = true 94 rtc_restrict_logging = false 95 } 96 97 if (is_ios) { 98 rtc_build_libjpeg = false 99 rtc_enable_protobuf = false 100 } 101 102 if (cpu_arch == "arm") { 103 rtc_prefer_fixed_point = true 104 } 105 106 # WebRTC builds ARM v7 Neon instruction set optimized code for both iOS and 107 # Android, which is why we currently cannot use the variables in 108 # //build/config/arm.gni (since it disables Neon for Android). 109 rtc_build_armv7_neon = (cpu_arch == "arm" && arm_version == 7) 110 } 111