blob: 0f10c0c390818cb932e50a0b4483169a1e14363f [file] [log] [blame]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +00001# 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.org524b8f72014-08-31 20:32:53 +00009import("//build/config/arm.gni")
10
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000011declare_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.org524b8f72014-08-31 20:32:53 +000017 # Disable this to avoid building the Opus audio codec.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000018 rtc_include_opus = true
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000019
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +000020 # Used to specify an external Jsoncpp include path when not compiling the
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000021 # library that comes with WebRTC (i.e. rtc_build_json == 0).
22 rtc_jsoncpp_root = "//third_party/jsoncpp/source/include"
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +000023
24 # Used to specify an external OpenSSL include path when not compiling the
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000025 # library that comes with WebRTC (i.e. rtc_build_ssl == 0).
26 rtc_ssl_root = ""
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +000027
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000028 # 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.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000031 rtc_enable_video = true
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000032
33 # Selects fixed-point code where possible.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000034 rtc_prefer_fixed_point = false
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000035
kjellander@webrtc.org78f440c2014-06-21 14:25:16 +000036 # Enable data logging. Produces text files with data logged within engines
37 # which can be easily parsed for offline processing.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000038 rtc_enable_data_logging = false
kjellander@webrtc.org78f440c2014-06-21 14:25:16 +000039
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000040 # Enables the use of protocol buffers for debug recordings.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000041 rtc_enable_protobuf = true
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000042
kjellander@webrtc.org11bea892014-07-03 17:04:12 +000043 # Disable these to not build components which can be externally provided.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000044 rtc_build_json = true
45 rtc_build_libjpeg = true
46 rtc_build_libyuv = true
47 rtc_build_libvpx = true
48 rtc_build_ssl = true
kjellander@webrtc.org11bea892014-07-03 17:04:12 +000049
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000050 # Disable by default.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000051 rtc_have_dbus_glib = false
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000052
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
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000062 rtc_enable_android_opensl = true
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000063
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000064 # Link-Time Optimizations.
65 # Executes code generation at link-time instead of compile-time.
66 # https://gcc.gnu.org/wiki/LinkTimeOptimization
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000067 rtc_use_lto = false
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000068
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000069 if (build_with_chromium) {
70 # Exclude pulse audio on Chromium since its prerequisites don't require
71 # pulse audio.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000072 rtc_include_pulse_audio = false
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000073
74 # Exclude internal ADM since Chromium uses its own IO handling.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000075 rtc_include_internal_audio_device = false
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000076
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000077 } 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
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000085 rtc_include_pulse_audio = true
86 rtc_include_internal_audio_device = true
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000087 }
88
89 if (build_with_libjingle) {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000090 rtc_include_tests = false
91 rtc_restrict_logging = true
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000092 } else {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000093 rtc_include_tests = true
94 rtc_restrict_logging = false
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000095 }
96
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000097 if (is_ios) {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000098 rtc_build_libjpeg = false
99 rtc_enable_protobuf = false
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000100 }
101
102 if (cpu_arch == "arm") {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000103 rtc_prefer_fixed_point = true
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000104 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000105
andrew@webrtc.org0001adc2014-10-09 04:13:02 +0000106 if (!is_ios && (cpu_arch != "arm" || arm_version >= 7)) {
andrew@webrtc.org4165f7a2014-10-08 18:01:27 +0000107 rtc_use_openmax_dl = true
108 } else {
109 rtc_use_openmax_dl = false
110 }
111
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +0000112 # WebRTC builds ARM v7 Neon instruction set optimized code for both iOS and
113 # Android, which is why we currently cannot use the variables in
114 # //build/config/arm.gni (since it disables Neon for Android).
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000115 rtc_build_armv7_neon = (cpu_arch == "arm" && arm_version == 7)
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000116}