kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 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 | |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 +0000 | [diff] [blame^] | 9 | import("//build/config/arm.gni") |
| 10 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 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 | |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 +0000 | [diff] [blame^] | 17 | # Disable this to avoid building the Opus audio codec. |
| 18 | include_opus = true |
| 19 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 20 | # Adds video support to dependencies shared by voice and video engine. |
| 21 | # This should normally be enabled; the intended use is to disable only |
| 22 | # when building voice engine exclusively. |
| 23 | enable_video = true |
| 24 | |
| 25 | # Selects fixed-point code where possible. |
| 26 | prefer_fixed_point = false |
| 27 | |
kjellander@webrtc.org | 78f440c | 2014-06-21 14:25:16 +0000 | [diff] [blame] | 28 | # Enable data logging. Produces text files with data logged within engines |
| 29 | # which can be easily parsed for offline processing. |
| 30 | enable_data_logging = false |
| 31 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 32 | # Enables the use of protocol buffers for debug recordings. |
| 33 | enable_protobuf = true |
| 34 | |
kjellander@webrtc.org | 11bea89 | 2014-07-03 17:04:12 +0000 | [diff] [blame] | 35 | # Disable these to not build components which can be externally provided. |
| 36 | build_json = true |
| 37 | build_libjpeg = true |
| 38 | build_libyuv = true |
| 39 | build_libvpx = true |
| 40 | build_ssl = true |
| 41 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 42 | # Disable by default. |
| 43 | have_dbus_glib = false |
| 44 | |
| 45 | # Enable to use the Mozilla internal settings. |
| 46 | build_with_mozilla = false |
| 47 | |
| 48 | # Define MIPS architecture variant, MIPS DSP variant and MIPS FPU |
| 49 | # This may be subject to change in accordance to Chromium's MIPS flags |
| 50 | mips_arch_variant = "mips32r1" |
| 51 | mips_dsp_rev = 0 |
| 52 | mips_fpu = true |
| 53 | |
| 54 | enable_android_opensl = true |
| 55 | |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 +0000 | [diff] [blame^] | 56 | # Link-Time Optimizations. |
| 57 | # Executes code generation at link-time instead of compile-time. |
| 58 | # https://gcc.gnu.org/wiki/LinkTimeOptimization |
| 59 | use_lto = false |
| 60 | |
kjellander@webrtc.org | 788f058 | 2014-08-28 13:51:08 +0000 | [diff] [blame] | 61 | if (build_with_chromium) { |
| 62 | # Exclude pulse audio on Chromium since its prerequisites don't require |
| 63 | # pulse audio. |
| 64 | include_pulse_audio = false |
| 65 | |
| 66 | # Exclude internal ADM since Chromium uses its own IO handling. |
| 67 | include_internal_audio_device = false |
| 68 | |
| 69 | # Exclude internal VCM in Chromium build. |
| 70 | include_internal_video_capture = false |
| 71 | |
| 72 | # Exclude internal video render module in Chromium build. |
| 73 | include_internal_video_render = false |
| 74 | } else { |
| 75 | # Settings for the standalone (not-in-Chromium) build. |
| 76 | |
| 77 | # TODO(andrew): For now, disable the Chrome plugins, which causes a |
| 78 | # flood of chromium-style warnings. Investigate enabling them: |
| 79 | # http://code.google.com/p/webrtc/issues/detail?id=163 |
| 80 | clang_use_chrome_plugins = false |
| 81 | |
| 82 | include_pulse_audio = true |
| 83 | include_internal_audio_device = true |
| 84 | include_internal_video_capture = true |
| 85 | include_internal_video_render = true |
| 86 | } |
| 87 | |
| 88 | if (build_with_libjingle) { |
| 89 | include_tests = false |
| 90 | restrict_webrtc_logging = true |
| 91 | } else { |
| 92 | include_tests = true |
| 93 | restrict_webrtc_logging = false |
| 94 | } |
| 95 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 96 | if (is_ios) { |
| 97 | build_libjpeg = false |
| 98 | enable_protobuf = false |
| 99 | } |
| 100 | |
| 101 | if (cpu_arch == "arm") { |
| 102 | prefer_fixed_point = true |
| 103 | } |
kjellander@webrtc.org | 524b8f7 | 2014-08-31 20:32:53 +0000 | [diff] [blame^] | 104 | |
| 105 | # WebRTC builds ARM v7 Neon instruction set optimized code for both iOS and |
| 106 | # Android, which is why we currently cannot use the variables in |
| 107 | # //build/config/arm.gni (since it disables Neon for Android). |
| 108 | build_armv7_neon = (cpu_arch == "arm" && arm_version == 7) |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 109 | } |