andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 1 | # Copyright (c) 2012 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 | # This file contains common settings for building WebRTC components. |
| 10 | |
| 11 | { |
| 12 | # Nesting is required in order to use variables for setting other variables. |
| 13 | 'variables': { |
| 14 | 'variables': { |
| 15 | 'variables': { |
| 16 | 'variables': { |
henrike@webrtc.org | 7ef7df5 | 2014-01-21 15:54:56 +0000 | [diff] [blame] | 17 | # This will already be set to zero by supplement.gypi |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 18 | 'build_with_chromium%': 1, |
kwiberg | 0edb05b | 2016-01-19 05:54:28 -0800 | [diff] [blame] | 19 | |
| 20 | # Enable to use the Mozilla internal settings. |
| 21 | 'build_with_mozilla%': 0, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 22 | }, |
| 23 | 'build_with_chromium%': '<(build_with_chromium)', |
kwiberg | 0edb05b | 2016-01-19 05:54:28 -0800 | [diff] [blame] | 24 | 'build_with_mozilla%': '<(build_with_mozilla%)', |
| 25 | 'include_opus%': 1, |
kwiberg | f8c2bac | 2016-01-18 06:38:32 -0800 | [diff] [blame] | 26 | |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 27 | 'conditions': [ |
kwiberg | 0edb05b | 2016-01-19 05:54:28 -0800 | [diff] [blame] | 28 | # Include the iLBC audio codec? |
| 29 | ['build_with_chromium==1 or build_with_mozilla==1', { |
| 30 | 'include_ilbc%': 0, |
| 31 | }, { |
| 32 | 'include_ilbc%': 1, |
| 33 | }], |
| 34 | |
henrike@webrtc.org | 4258154 | 2013-07-16 16:37:22 +0000 | [diff] [blame] | 35 | ['build_with_chromium==1', { |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 36 | 'webrtc_root%': '<(DEPTH)/third_party/webrtc', |
kjellander@webrtc.org | 0372b93 | 2014-09-03 14:34:46 +0000 | [diff] [blame] | 37 | 'apk_tests_path%': '<(DEPTH)/third_party/webrtc/build/apk_tests_noop.gyp', |
henrike@webrtc.org | a2073af | 2013-07-08 18:14:58 +0000 | [diff] [blame] | 38 | 'modules_java_gyp_path%': '<(DEPTH)/third_party/webrtc/modules/modules_java_chromium.gyp', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 39 | }, { |
| 40 | 'webrtc_root%': '<(DEPTH)/webrtc', |
kjellander@webrtc.org | 0372b93 | 2014-09-03 14:34:46 +0000 | [diff] [blame] | 41 | 'apk_tests_path%': '<(DEPTH)/webrtc/build/apk_tests.gyp', |
henrike@webrtc.org | a2073af | 2013-07-08 18:14:58 +0000 | [diff] [blame] | 42 | 'modules_java_gyp_path%': '<(DEPTH)/webrtc/modules/modules_java.gyp', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 43 | }], |
| 44 | ], |
| 45 | }, |
| 46 | 'build_with_chromium%': '<(build_with_chromium)', |
kwiberg | f8c2bac | 2016-01-18 06:38:32 -0800 | [diff] [blame] | 47 | 'build_with_mozilla%': '<(build_with_mozilla)', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 48 | 'webrtc_root%': '<(webrtc_root)', |
kjellander@webrtc.org | 0372b93 | 2014-09-03 14:34:46 +0000 | [diff] [blame] | 49 | 'apk_tests_path%': '<(apk_tests_path)', |
henrike@webrtc.org | a2073af | 2013-07-08 18:14:58 +0000 | [diff] [blame] | 50 | 'modules_java_gyp_path%': '<(modules_java_gyp_path)', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 51 | 'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8', |
marpan@webrtc.org | 5b88317 | 2014-11-01 06:10:48 +0000 | [diff] [blame] | 52 | 'webrtc_vp9_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp9', |
kwiberg | 0edb05b | 2016-01-19 05:54:28 -0800 | [diff] [blame] | 53 | 'include_ilbc%': '<(include_ilbc)', |
| 54 | 'include_opus%': '<(include_opus)', |
kjellander@webrtc.org | 2b69eab | 2015-02-09 10:01:17 +0000 | [diff] [blame] | 55 | 'opus_dir%': '<(DEPTH)/third_party/opus', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 56 | }, |
| 57 | 'build_with_chromium%': '<(build_with_chromium)', |
kwiberg | 98ab3a4 | 2015-09-30 21:54:21 -0700 | [diff] [blame] | 58 | 'build_with_mozilla%': '<(build_with_mozilla)', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 59 | 'webrtc_root%': '<(webrtc_root)', |
kjellander@webrtc.org | 0372b93 | 2014-09-03 14:34:46 +0000 | [diff] [blame] | 60 | 'apk_tests_path%': '<(apk_tests_path)', |
henrike@webrtc.org | a2073af | 2013-07-08 18:14:58 +0000 | [diff] [blame] | 61 | 'modules_java_gyp_path%': '<(modules_java_gyp_path)', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 62 | 'webrtc_vp8_dir%': '<(webrtc_vp8_dir)', |
marpan@webrtc.org | 5b88317 | 2014-11-01 06:10:48 +0000 | [diff] [blame] | 63 | 'webrtc_vp9_dir%': '<(webrtc_vp9_dir)', |
kwiberg | f8c2bac | 2016-01-18 06:38:32 -0800 | [diff] [blame] | 64 | 'include_ilbc%': '<(include_ilbc)', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 65 | 'include_opus%': '<(include_opus)', |
henrike@webrtc.org | d72a759 | 2014-09-02 15:41:12 +0000 | [diff] [blame] | 66 | 'rtc_relative_path%': 1, |
henrike@webrtc.org | 9f36c08 | 2014-06-16 21:35:20 +0000 | [diff] [blame] | 67 | 'external_libraries%': '0', |
| 68 | 'json_root%': '<(DEPTH)/third_party/jsoncpp/source/include/', |
| 69 | # openssl needs to be defined or gyp will complain. Is is only used when |
| 70 | # when providing external libraries so just use current directory as a |
| 71 | # placeholder. |
| 72 | 'ssl_root%': '.', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 73 | |
| 74 | # The Chromium common.gypi we use treats all gyp files without |
| 75 | # chromium_code==1 as third party code. This disables many of the |
| 76 | # preferred warning settings. |
| 77 | # |
| 78 | # We can set this here to have WebRTC code treated as Chromium code. Our |
| 79 | # third party code will still have the reduced warning settings. |
| 80 | 'chromium_code': 1, |
| 81 | |
kjellander@webrtc.org | 0aa04f9 | 2014-03-28 13:14:00 +0000 | [diff] [blame] | 82 | # Set to 1 to enable code coverage on Linux using the gcov library. |
| 83 | 'coverage%': 0, |
| 84 | |
solenberg@webrtc.org | d6e4663 | 2013-10-30 16:06:26 +0000 | [diff] [blame] | 85 | # Remote bitrate estimator logging/plotting. |
| 86 | 'enable_bwe_test_logging%': 0, |
| 87 | |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 88 | # Selects fixed-point code where possible. |
| 89 | 'prefer_fixed_point%': 0, |
| 90 | |
| 91 | # Enable data logging. Produces text files with data logged within engines |
| 92 | # which can be easily parsed for offline processing. |
| 93 | 'enable_data_logging%': 0, |
| 94 | |
andrew@webrtc.org | f9825e5 | 2013-05-20 21:18:04 +0000 | [diff] [blame] | 95 | # Enables the use of protocol buffers for debug recordings. |
| 96 | 'enable_protobuf%': 1, |
| 97 | |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 98 | # Disable these to not build components which can be externally provided. |
Henrik Kjellander | e6cefb6 | 2015-04-27 14:39:04 +0200 | [diff] [blame] | 99 | 'build_expat%': 1, |
henrike@webrtc.org | a685c9d | 2014-06-17 14:48:44 +0000 | [diff] [blame] | 100 | 'build_json%': 1, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 101 | 'build_libjpeg%': 1, |
kjellander@webrtc.org | 9b8df25 | 2016-02-12 06:47:59 +0100 | [diff] [blame^] | 102 | 'build_libsrtp%': 1, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 103 | 'build_libvpx%': 1, |
Henrik Kjellander | e6cefb6 | 2015-04-27 14:39:04 +0200 | [diff] [blame] | 104 | 'build_libyuv%': 1, |
andrew@webrtc.org | d2c09dd | 2015-03-11 22:06:55 +0000 | [diff] [blame] | 105 | 'build_openmax_dl%': 1, |
minyue@webrtc.org | 7c112f3 | 2015-03-17 14:04:56 +0000 | [diff] [blame] | 106 | 'build_opus%': 1, |
kjellander | 292e192 | 2016-01-13 05:46:58 -0800 | [diff] [blame] | 107 | 'build_protobuf%': 1, |
Henrik Kjellander | e6cefb6 | 2015-04-27 14:39:04 +0200 | [diff] [blame] | 108 | 'build_ssl%': 1, |
kjellander | a96e2d7 | 2016-02-04 23:52:28 -0800 | [diff] [blame] | 109 | 'build_usrsctp%': 1, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 110 | |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 111 | # Disable by default |
| 112 | 'have_dbus_glib%': 0, |
| 113 | |
kjellander@webrtc.org | 2b69eab | 2015-02-09 10:01:17 +0000 | [diff] [blame] | 114 | # Make it possible to provide custom locations for some libraries. |
kjellander | d6024e3 | 2015-09-28 21:16:48 -0700 | [diff] [blame] | 115 | 'libvpx_dir%': '<(DEPTH)/third_party/libvpx_new', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 116 | 'libyuv_dir%': '<(DEPTH)/third_party/libyuv', |
kjellander@webrtc.org | 2b69eab | 2015-02-09 10:01:17 +0000 | [diff] [blame] | 117 | 'opus_dir%': '<(opus_dir)', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 118 | |
henrika@webrtc.org | 45db7ee | 2015-01-12 14:27:23 +0000 | [diff] [blame] | 119 | # Use Java based audio layer as default for Android. |
| 120 | # Change this setting to 1 to use Open SL audio instead. |
| 121 | # TODO(henrika): add support for Open SL ES. |
| 122 | 'enable_android_opensl%': 0, |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 123 | |
andrew@webrtc.org | af7fdfc | 2014-08-29 17:41:13 +0000 | [diff] [blame] | 124 | # Link-Time Optimizations |
| 125 | # Executes code generation at link-time instead of compile-time |
| 126 | # https://gcc.gnu.org/wiki/LinkTimeOptimization |
| 127 | 'use_lto%': 0, |
| 128 | |
tpsiaki@google.com | 67eabc0 | 2014-09-10 18:06:47 +0000 | [diff] [blame] | 129 | # Defer ssl perference to that specified through sslconfig.h instead of |
| 130 | # choosing openssl or nss directly. In practice, this can be used to |
| 131 | # enable schannel on windows. |
| 132 | 'use_legacy_ssl_defaults%': 0, |
| 133 | |
Andrew MacDonald | ac4234c | 2015-06-24 18:25:54 -0700 | [diff] [blame] | 134 | # Determines whether NEON code will be built. |
| 135 | 'build_with_neon%': 0, |
| 136 | |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 137 | # Disable this to skip building source requiring GTK. |
| 138 | 'use_gtk%': 1, |
| 139 | |
Zeke Chin | 71f6f44 | 2015-06-29 14:34:58 -0700 | [diff] [blame] | 140 | # Enable this to use HW H.264 encoder/decoder on iOS/Mac PeerConnections. |
| 141 | # Enabling this may break interop with Android clients that support H264. |
| 142 | 'use_objc_h264%': 0, |
| 143 | |
mikescarlett | cd0e475 | 2016-02-08 17:35:47 -0800 | [diff] [blame] | 144 | # Determines whether QUIC code will be built. |
| 145 | 'use_quic%': 0, |
| 146 | |
hbos | a81f6a3 | 2016-02-07 15:05:22 -0800 | [diff] [blame] | 147 | 'conditions': [ |
hbos | 62756ee | 2016-02-08 02:57:00 -0800 | [diff] [blame] | 148 | # Enable this to build OpenH264 encoder/FFmpeg decoder. This is supported |
| 149 | # on all platforms except Android and iOS. Because FFmpeg can be built |
| 150 | # with/without H.264 support, |ffmpeg_branding| has to separately be set |
| 151 | # to a value that includes H.264, for example "Chrome". If FFmpeg is built |
| 152 | # without H.264, compilation succeeds but |H264DecoderImpl| fails to |
| 153 | # initialize. See also: |rtc_initialize_ffmpeg|. |
| 154 | # CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING. |
| 155 | # http://www.openh264.org, https://www.ffmpeg.org/ |
| 156 | ['proprietary_codecs==1 and OS!="android" and OS!="ios"', { |
| 157 | 'rtc_use_h264%': 1, |
| 158 | }, { |
| 159 | 'rtc_use_h264%': 0, |
| 160 | }], |
| 161 | |
hbos | c5a39c2 | 2016-02-02 02:26:05 -0800 | [diff] [blame] | 162 | # FFmpeg must be initialized for |H264DecoderImpl| to work. This can be |
| 163 | # done by WebRTC during |H264DecoderImpl::InitDecode| or externally. |
| 164 | # FFmpeg must only be initialized once. Projects that initialize FFmpeg |
| 165 | # externally, such as Chromium, must turn this flag off so that WebRTC |
| 166 | # does not also initialize. |
| 167 | ['build_with_chromium==0', { |
| 168 | 'rtc_initialize_ffmpeg%': 1, |
| 169 | }, { |
| 170 | 'rtc_initialize_ffmpeg%': 0, |
| 171 | }], |
| 172 | |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 173 | ['build_with_chromium==1', { |
kjellander | 1c24a6d | 2016-02-05 13:10:34 -0800 | [diff] [blame] | 174 | # Build sources requiring GTK. NOTICE: This is not present in Chrome OS |
| 175 | # build environments, even if available for Chromium builds. |
| 176 | 'use_gtk%': 0, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 177 | # Exclude pulse audio on Chromium since its prerequisites don't require |
| 178 | # pulse audio. |
| 179 | 'include_pulse_audio%': 0, |
| 180 | |
| 181 | # Exclude internal ADM since Chromium uses its own IO handling. |
| 182 | 'include_internal_audio_device%': 0, |
kjellander@webrtc.org | f22695c | 2015-11-19 15:39:29 +0100 | [diff] [blame] | 183 | |
| 184 | # Remove tests for Chromium to avoid slowing down GYP generation. |
| 185 | 'include_tests%': 0, |
| 186 | 'restrict_webrtc_logging%': 1, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 187 | }, { # Settings for the standalone (not-in-Chromium) build. |
kjellander | 1c24a6d | 2016-02-05 13:10:34 -0800 | [diff] [blame] | 188 | 'use_gtk%': 1, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 189 | # TODO(andrew): For now, disable the Chrome plugins, which causes a |
| 190 | # flood of chromium-style warnings. Investigate enabling them: |
| 191 | # http://code.google.com/p/webrtc/issues/detail?id=163 |
| 192 | 'clang_use_chrome_plugins%': 0, |
| 193 | |
henrike@webrtc.org | 4258154 | 2013-07-16 16:37:22 +0000 | [diff] [blame] | 194 | 'include_pulse_audio%': 1, |
| 195 | 'include_internal_audio_device%': 1, |
henrike@webrtc.org | 4258154 | 2013-07-16 16:37:22 +0000 | [diff] [blame] | 196 | 'include_tests%': 1, |
andrew@webrtc.org | f1a4817 | 2013-11-07 23:47:26 +0000 | [diff] [blame] | 197 | 'restrict_webrtc_logging%': 0, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 198 | }], |
| 199 | ['OS=="ios"', { |
fischman@webrtc.org | d0f4c21 | 2013-08-20 22:16:55 +0000 | [diff] [blame] | 200 | 'build_libjpeg%': 0, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 201 | }], |
andrew@webrtc.org | 1090a6e | 2014-12-18 21:36:18 +0000 | [diff] [blame] | 202 | ['target_arch=="arm" or target_arch=="arm64"', { |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 203 | 'prefer_fixed_point%': 1, |
| 204 | }], |
Andrew MacDonald | ac4234c | 2015-06-24 18:25:54 -0700 | [diff] [blame] | 205 | ['(target_arch=="arm" and (arm_neon==1 or arm_neon_optional==1)) or target_arch=="arm64"', { |
| 206 | 'build_with_neon%': 1, |
| 207 | }], |
andrew@webrtc.org | 34ac956 | 2014-12-30 18:19:56 +0000 | [diff] [blame] | 208 | ['OS!="ios" and (target_arch!="arm" or arm_version>=7) and target_arch!="mips64el"', { |
andrew@webrtc.org | 4165f7a | 2014-10-08 18:01:27 +0000 | [diff] [blame] | 209 | 'rtc_use_openmax_dl%': 1, |
| 210 | }, { |
| 211 | 'rtc_use_openmax_dl%': 0, |
| 212 | }], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 213 | ], # conditions |
| 214 | }, |
| 215 | 'target_defaults': { |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 216 | 'conditions': [ |
andrew@webrtc.org | f1a4817 | 2013-11-07 23:47:26 +0000 | [diff] [blame] | 217 | ['restrict_webrtc_logging==1', { |
| 218 | 'defines': ['WEBRTC_RESTRICT_LOGGING',], |
andrew@webrtc.org | c3e5d34 | 2012-11-23 19:30:59 +0000 | [diff] [blame] | 219 | }], |
tina.legrand@webrtc.org | 1f8c02a | 2012-10-25 12:37:08 +0000 | [diff] [blame] | 220 | ['build_with_mozilla==1', { |
| 221 | 'defines': [ |
| 222 | # Changes settings for Mozilla build. |
| 223 | 'WEBRTC_MOZILLA_BUILD', |
| 224 | ], |
| 225 | }], |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 226 | ['have_dbus_glib==1', { |
| 227 | 'defines': [ |
| 228 | 'HAVE_DBUS_GLIB', |
| 229 | ], |
| 230 | 'cflags': [ |
| 231 | '<!@(pkg-config --cflags dbus-glib-1)', |
| 232 | ], |
| 233 | }], |
henrike@webrtc.org | d72a759 | 2014-09-02 15:41:12 +0000 | [diff] [blame] | 234 | ['rtc_relative_path==1', { |
| 235 | 'defines': ['EXPAT_RELATIVE_PATH',], |
| 236 | }], |
tommi@webrtc.org | a32f064 | 2015-03-08 07:38:31 +0000 | [diff] [blame] | 237 | ['os_posix==1', { |
| 238 | 'configurations': { |
| 239 | 'Debug_Base': { |
| 240 | 'defines': [ |
| 241 | # Chromium's build/common.gypi defines _DEBUG for all posix |
| 242 | # _except_ for ios & mac. The size of data types such as |
| 243 | # pthread_mutex_t varies between release and debug builds |
| 244 | # and is controlled via this flag. Since we now share code |
| 245 | # between base/base.gyp and build/common.gypi (this file), |
| 246 | # both gyp(i) files, must consistently set this flag uniformly |
| 247 | # or else we'll run in to hard-to-figure-out problems where |
| 248 | # one compilation unit uses code from another but expects |
| 249 | # differently laid out types. |
| 250 | # For WebRTC, we want it there as well, because ASSERT and |
| 251 | # friends trigger off of it. |
| 252 | '_DEBUG', |
| 253 | ], |
| 254 | }, |
| 255 | }, |
| 256 | }], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 257 | ['build_with_chromium==1', { |
| 258 | 'defines': [ |
| 259 | # Changes settings for Chromium build. |
| 260 | 'WEBRTC_CHROMIUM_BUILD', |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 261 | 'LOGGING_INSIDE_WEBRTC', |
| 262 | ], |
| 263 | 'include_dirs': [ |
kjellander@webrtc.org | f2ec814 | 2015-01-30 14:54:36 +0000 | [diff] [blame] | 264 | # Include the top-level directory when building in Chrome, so we can |
| 265 | # use full paths (e.g. headers inside testing/ or third_party/). |
| 266 | '<(DEPTH)', |
| 267 | # The overrides must be included before the WebRTC root as that's the |
| 268 | # mechanism for selecting the override headers in Chromium. |
henrikg | ee2bf41 | 2015-09-30 03:48:52 -0700 | [diff] [blame] | 269 | '../../webrtc_overrides', |
kjellander@webrtc.org | f2ec814 | 2015-01-30 14:54:36 +0000 | [diff] [blame] | 270 | # The WebRTC root is needed to allow includes in the WebRTC code base |
| 271 | # to be prefixed with webrtc/. |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 272 | '../..', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 273 | ], |
| 274 | }, { |
kjellander@webrtc.org | f2ec814 | 2015-01-30 14:54:36 +0000 | [diff] [blame] | 275 | # Include the top-level dir so the WebRTC code can use full paths. |
| 276 | 'include_dirs': [ |
| 277 | '../..', |
| 278 | ], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 279 | 'conditions': [ |
| 280 | ['os_posix==1', { |
solenberg@webrtc.org | c6db88b | 2014-06-04 17:15:42 +0000 | [diff] [blame] | 281 | 'conditions': [ |
| 282 | # -Wextra is currently disabled in Chromium's common.gypi. Enable |
| 283 | # for targets that can handle it. For Android/arm64 right now |
| 284 | # there will be an 'enumeral and non-enumeral type in conditional |
| 285 | # expression' warning in android_tools/ndk_experimental's version |
| 286 | # of stlport. |
| 287 | # See: https://code.google.com/p/chromium/issues/detail?id=379699 |
| 288 | ['target_arch!="arm64" or OS!="android"', { |
| 289 | 'cflags': [ |
| 290 | '-Wextra', |
| 291 | # We need to repeat some flags from Chromium's common.gypi |
| 292 | # here that get overridden by -Wextra. |
| 293 | '-Wno-unused-parameter', |
| 294 | '-Wno-missing-field-initializers', |
| 295 | '-Wno-strict-overflow', |
| 296 | ], |
| 297 | }], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 298 | ], |
| 299 | 'cflags_cc': [ |
pbos@webrtc.org | b3cc78d | 2013-11-21 11:42:02 +0000 | [diff] [blame] | 300 | '-Wnon-virtual-dtor', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 301 | # This is enabled for clang; enable for gcc as well. |
| 302 | '-Woverloaded-virtual', |
| 303 | ], |
| 304 | }], |
andresp@webrtc.org | 7fb75ec | 2013-12-20 20:20:50 +0000 | [diff] [blame] | 305 | ['clang==1', { |
| 306 | 'cflags': [ |
kjellander@webrtc.org | 7d2b6a9 | 2015-01-28 18:37:58 +0000 | [diff] [blame] | 307 | '-Wimplicit-fallthrough', |
andresp@webrtc.org | 7fb75ec | 2013-12-20 20:20:50 +0000 | [diff] [blame] | 308 | '-Wthread-safety', |
| 309 | ], |
| 310 | }], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 311 | ], |
| 312 | }], |
tkchin@webrtc.org | 14146e4 | 2014-10-31 00:14:39 +0000 | [diff] [blame] | 313 | ['target_arch=="arm64"', { |
| 314 | 'defines': [ |
Andrew MacDonald | cb7f8ce | 2015-05-19 22:20:17 -0700 | [diff] [blame] | 315 | 'WEBRTC_ARCH_ARM64', |
| 316 | 'WEBRTC_HAS_NEON', |
tkchin@webrtc.org | 14146e4 | 2014-10-31 00:14:39 +0000 | [diff] [blame] | 317 | ], |
| 318 | }], |
andrew@webrtc.org | 1090a6e | 2014-12-18 21:36:18 +0000 | [diff] [blame] | 319 | ['target_arch=="arm"', { |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 320 | 'defines': [ |
| 321 | 'WEBRTC_ARCH_ARM', |
| 322 | ], |
| 323 | 'conditions': [ |
andrew@webrtc.org | a56a2c5 | 2014-11-26 17:01:40 +0000 | [diff] [blame] | 324 | ['arm_version>=7', { |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 325 | 'defines': ['WEBRTC_ARCH_ARM_V7',], |
| 326 | 'conditions': [ |
| 327 | ['arm_neon==1', { |
Andrew MacDonald | cb7f8ce | 2015-05-19 22:20:17 -0700 | [diff] [blame] | 328 | 'defines': ['WEBRTC_HAS_NEON',], |
andrew@webrtc.org | a56a2c5 | 2014-11-26 17:01:40 +0000 | [diff] [blame] | 329 | }], |
Andrew MacDonald | cb7f8ce | 2015-05-19 22:20:17 -0700 | [diff] [blame] | 330 | ['arm_neon==0 and arm_neon_optional==1', { |
| 331 | 'defines': ['WEBRTC_DETECT_NEON',], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 332 | }], |
| 333 | ], |
| 334 | }], |
| 335 | ], |
| 336 | }], |
Richard Coles | d417c93 | 2015-04-09 17:36:12 +0200 | [diff] [blame] | 337 | ['target_arch=="mipsel" and mips_arch_variant!="r6"', { |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 338 | 'defines': [ |
| 339 | 'MIPS32_LE', |
| 340 | ], |
| 341 | 'conditions': [ |
kjellander@webrtc.org | 6dab6d7 | 2015-03-04 09:50:31 +0000 | [diff] [blame] | 342 | ['mips_float_abi=="hard"', { |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 343 | 'defines': [ |
| 344 | 'MIPS_FPU_LE', |
| 345 | ], |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 346 | }], |
andrew@webrtc.org | d05756f | 2014-09-30 15:53:24 +0000 | [diff] [blame] | 347 | ['mips_arch_variant=="r2"', { |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 348 | 'defines': [ |
| 349 | 'MIPS32_R2_LE', |
| 350 | ], |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 351 | }], |
| 352 | ['mips_dsp_rev==1', { |
| 353 | 'defines': [ |
| 354 | 'MIPS_DSP_R1_LE', |
| 355 | ], |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 356 | }], |
| 357 | ['mips_dsp_rev==2', { |
| 358 | 'defines': [ |
| 359 | 'MIPS_DSP_R1_LE', |
| 360 | 'MIPS_DSP_R2_LE', |
| 361 | ], |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 362 | }], |
| 363 | ], |
| 364 | }], |
kjellander@webrtc.org | 0aa04f9 | 2014-03-28 13:14:00 +0000 | [diff] [blame] | 365 | ['coverage==1 and OS=="linux"', { |
| 366 | 'cflags': [ '-ftest-coverage', |
| 367 | '-fprofile-arcs' ], |
| 368 | 'link_settings': { 'libraries': [ '-lgcov' ] }, |
| 369 | }], |
henrike@webrtc.org | cc08e3f | 2014-03-07 15:30:21 +0000 | [diff] [blame] | 370 | ['os_posix==1', { |
| 371 | # For access to standard POSIXish features, use WEBRTC_POSIX instead of |
| 372 | # a more specific macro. |
| 373 | 'defines': [ |
| 374 | 'WEBRTC_POSIX', |
| 375 | ], |
| 376 | }], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 377 | ['OS=="ios"', { |
| 378 | 'defines': [ |
| 379 | 'WEBRTC_MAC', |
| 380 | 'WEBRTC_IOS', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 381 | ], |
| 382 | }], |
Zeke Chin | 71f6f44 | 2015-06-29 14:34:58 -0700 | [diff] [blame] | 383 | ['OS=="ios" and use_objc_h264==1', { |
| 384 | 'defines': [ |
| 385 | 'WEBRTC_OBJC_H264', |
| 386 | ], |
| 387 | }], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 388 | ['OS=="linux"', { |
| 389 | 'defines': [ |
| 390 | 'WEBRTC_LINUX', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 391 | ], |
| 392 | }], |
| 393 | ['OS=="mac"', { |
| 394 | 'defines': [ |
| 395 | 'WEBRTC_MAC', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 396 | ], |
| 397 | }], |
| 398 | ['OS=="win"', { |
| 399 | 'defines': [ |
| 400 | 'WEBRTC_WIN', |
| 401 | ], |
| 402 | # TODO(andrew): enable all warnings when possible. |
kjellander@webrtc.org | fa53d87 | 2013-02-04 10:07:17 +0000 | [diff] [blame] | 403 | # TODO(phoglund): get rid of 4373 supression when |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 404 | # http://code.google.com/p/webrtc/issues/detail?id=261 is solved. |
kjellander@webrtc.org | fa53d87 | 2013-02-04 10:07:17 +0000 | [diff] [blame] | 405 | 'msvs_disabled_warnings': [ |
| 406 | 4373, # legacy warning for ignoring const / volatile in signatures. |
| 407 | 4389, # Signed/unsigned mismatch. |
| 408 | ], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 409 | # Re-enable some warnings that Chromium disables. |
| 410 | 'msvs_disabled_warnings!': [4189,], |
| 411 | }], |
| 412 | ['OS=="android"', { |
| 413 | 'defines': [ |
| 414 | 'WEBRTC_LINUX', |
| 415 | 'WEBRTC_ANDROID', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 416 | ], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 417 | 'conditions': [ |
Henrik Kjellander | c0c7d2e | 2015-09-07 12:57:42 +0200 | [diff] [blame] | 418 | ['clang==0', { |
Henrik Kjellander | 5bfc6cb | 2015-09-21 16:50:45 +0200 | [diff] [blame] | 419 | # The Android NDK doesn't provide optimized versions of these |
| 420 | # functions. Ensure they are disabled for all compilers. |
wjia@webrtc.org | b119369 | 2013-01-12 01:52:07 +0000 | [diff] [blame] | 421 | 'cflags': [ |
| 422 | '-fno-builtin-cos', |
| 423 | '-fno-builtin-sin', |
| 424 | '-fno-builtin-cosf', |
| 425 | '-fno-builtin-sinf', |
| 426 | ], |
| 427 | }], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 428 | ], |
| 429 | }], |
Tommi | 931e658 | 2015-05-20 09:44:38 +0200 | [diff] [blame] | 430 | ['include_internal_audio_device==1', { |
| 431 | 'defines': [ |
| 432 | 'WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE', |
| 433 | ], |
| 434 | }], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 435 | ], # conditions |
sergeyu@chromium.org | 6ebfd34 | 2013-05-22 18:22:21 +0000 | [diff] [blame] | 436 | 'direct_dependent_settings': { |
sergeyu@chromium.org | 6ebfd34 | 2013-05-22 18:22:21 +0000 | [diff] [blame] | 437 | 'conditions': [ |
| 438 | ['build_with_mozilla==1', { |
| 439 | 'defines': [ |
| 440 | # Changes settings for Mozilla build. |
| 441 | 'WEBRTC_MOZILLA_BUILD', |
| 442 | ], |
| 443 | }], |
| 444 | ['build_with_chromium==1', { |
| 445 | 'defines': [ |
| 446 | # Changes settings for Chromium build. |
| 447 | 'WEBRTC_CHROMIUM_BUILD', |
| 448 | ], |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 449 | 'include_dirs': [ |
henrikg | ee2bf41 | 2015-09-30 03:48:52 -0700 | [diff] [blame] | 450 | # The overrides must be included first as that is the mechanism for |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 451 | # selecting the override headers in Chromium. |
henrikg | ee2bf41 | 2015-09-30 03:48:52 -0700 | [diff] [blame] | 452 | '../../webrtc_overrides', |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 453 | '../..', |
| 454 | ], |
| 455 | }, { |
| 456 | 'include_dirs': [ |
| 457 | '../..', |
| 458 | ], |
sergeyu@chromium.org | 6ebfd34 | 2013-05-22 18:22:21 +0000 | [diff] [blame] | 459 | }], |
| 460 | ['OS=="mac"', { |
| 461 | 'defines': [ |
| 462 | 'WEBRTC_MAC', |
| 463 | ], |
| 464 | }], |
| 465 | ['OS=="ios"', { |
| 466 | 'defines': [ |
| 467 | 'WEBRTC_MAC', |
| 468 | 'WEBRTC_IOS', |
| 469 | ], |
| 470 | }], |
| 471 | ['OS=="win"', { |
| 472 | 'defines': [ |
| 473 | 'WEBRTC_WIN', |
| 474 | ], |
| 475 | }], |
| 476 | ['OS=="linux"', { |
| 477 | 'defines': [ |
| 478 | 'WEBRTC_LINUX', |
| 479 | ], |
| 480 | }], |
| 481 | ['OS=="android"', { |
| 482 | 'defines': [ |
| 483 | 'WEBRTC_LINUX', |
| 484 | 'WEBRTC_ANDROID', |
| 485 | ], |
sergeyu@chromium.org | 6ebfd34 | 2013-05-22 18:22:21 +0000 | [diff] [blame] | 486 | }], |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 487 | ['os_posix==1', { |
| 488 | # For access to standard POSIXish features, use WEBRTC_POSIX instead |
| 489 | # of a more specific macro. |
| 490 | 'defines': [ |
| 491 | 'WEBRTC_POSIX', |
| 492 | ], |
| 493 | }], |
sergeyu@chromium.org | 6ebfd34 | 2013-05-22 18:22:21 +0000 | [diff] [blame] | 494 | ], |
| 495 | }, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 496 | }, # target_defaults |
| 497 | } |
| 498 | |