blob: 31f0ef501b23f36b5415e59b730a0cca9dfe1f97 [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")
kjellander@webrtc.orgacb80852015-01-25 19:17:56 +000010import("//build/config/mips.gni")
Henrik Kjellanderb79472a2015-10-14 08:13:58 +020011import("//build_overrides/webrtc.gni")
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000012
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000013declare_args() {
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000014 build_with_libjingle = true
15
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000016 # Disable this to avoid building the Opus audio codec.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000017 rtc_include_opus = true
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000018
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +000019 # Used to specify an external Jsoncpp include path when not compiling the
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000020 # library that comes with WebRTC (i.e. rtc_build_json == 0).
21 rtc_jsoncpp_root = "//third_party/jsoncpp/source/include"
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +000022
23 # Used to specify an external OpenSSL include path when not compiling the
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000024 # library that comes with WebRTC (i.e. rtc_build_ssl == 0).
25 rtc_ssl_root = ""
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +000026
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000027 # Selects fixed-point code where possible.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000028 rtc_prefer_fixed_point = false
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000029
kjellander@webrtc.org78f440c2014-06-21 14:25:16 +000030 # Enable data logging. Produces text files with data logged within engines
31 # which can be easily parsed for offline processing.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000032 rtc_enable_data_logging = false
kjellander@webrtc.org78f440c2014-06-21 14:25:16 +000033
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000034 # Enables the use of protocol buffers for debug recordings.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000035 rtc_enable_protobuf = true
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000036
kjellander@webrtc.org11bea892014-07-03 17:04:12 +000037 # Disable these to not build components which can be externally provided.
Henrik Kjellandere6cefb62015-04-27 14:39:04 +020038 rtc_build_expat = true
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000039 rtc_build_json = true
40 rtc_build_libjpeg = true
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000041 rtc_build_libvpx = true
Henrik Kjellandere6cefb62015-04-27 14:39:04 +020042 rtc_build_libyuv = true
Andrew MacDonald23dc68e2015-04-24 08:46:51 -070043 rtc_build_openmax_dl = true
Henrik Kjellandere6cefb62015-04-27 14:39:04 +020044 rtc_build_opus = true
45 rtc_build_ssl = true
kjellander@webrtc.org11bea892014-07-03 17:04:12 +000046
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000047 # Disable by default.
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000048 rtc_have_dbus_glib = false
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000049
50 # Enable to use the Mozilla internal settings.
51 build_with_mozilla = false
52
henrika@webrtc.org45db7ee2015-01-12 14:27:23 +000053 rtc_enable_android_opensl = false
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000054
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000055 # Link-Time Optimizations.
56 # Executes code generation at link-time instead of compile-time.
57 # https://gcc.gnu.org/wiki/LinkTimeOptimization
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000058 rtc_use_lto = false
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000059
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000060 if (build_with_libjingle) {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000061 rtc_include_tests = false
62 rtc_restrict_logging = true
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000063 } else {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000064 rtc_include_tests = true
65 rtc_restrict_logging = false
kjellander@webrtc.org788f0582014-08-28 13:51:08 +000066 }
67
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000068 if (is_ios) {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000069 rtc_build_libjpeg = false
70 rtc_enable_protobuf = false
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000071 }
72
kjellander@webrtc.org72273912015-02-23 19:08:31 +000073 if (current_cpu == "arm") {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000074 rtc_prefer_fixed_point = true
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000075 }
kjellander@webrtc.org524b8f72014-08-31 20:32:53 +000076
andrew@webrtc.org34ac9562014-12-30 18:19:56 +000077 # TODO(ljubomir): Unset rtc_use_openmax_dl for mips64el once mips64el gets
78 # supported in GN (since openmax_dl is not supported for mips64el).
kjellander@webrtc.org72273912015-02-23 19:08:31 +000079 if (!is_ios && (current_cpu != "arm" || arm_version >= 7)) {
andrew@webrtc.org4165f7a2014-10-08 18:01:27 +000080 rtc_use_openmax_dl = true
81 } else {
82 rtc_use_openmax_dl = false
83 }
84
Andrew MacDonaldac4234c2015-06-24 18:25:54 -070085 # Determines whether NEON code will be built.
petermayo50cf10d2015-07-09 09:45:04 -070086 rtc_build_with_neon =
87 (current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon)) ||
88 current_cpu == "arm64"
Zeke Chin71f6f442015-06-29 14:34:58 -070089
90 # Enable this to use HW H.264 encoder/decoder on iOS PeerConnections.
91 # Enabling this may break interop with Android clients that support H264.
92 rtc_use_objc_h264 = false
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000093}
kjellander@webrtc.orgce22f132015-02-16 12:47:20 +000094
95# Make it possible to provide custom locations for some libraries (move these
96# up into declare_args should we need to actually use them for the GN build).
kjellanderd6024e32015-09-28 21:16:48 -070097rtc_libvpx_dir = "//third_party/libvpx_new"
kjellander@webrtc.orgce22f132015-02-16 12:47:20 +000098rtc_libyuv_dir = "//third_party/libyuv"
99rtc_opus_dir = "//third_party/opus"